The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A264940 Lucky factor of n. 5
0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 9, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 0, 2, 13, 2, 3, 2, 0, 2, 0, 2, 3, 2, 15, 2, 9, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 21, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence is analogous to the smallest prime factor of n (A020639). If n is lucky, a(n)=0; if n is unlucky, a(n) is the number that rejects n from the lucky number sieve. This is 2 for even numbers, and a lucky number >= 3 for odd unlucky numbers.
LINKS
FORMULA
From Antti Karttunen, Sep 11 2016: (Start)
If A145649(n) = 1 [when n is lucky], a(n) = 0, else if n is even, a(n) = 2, otherwise a(n) = A000959(A265859(n)) = A000959(A260438(n)).
For n >= 2, a(A219178(n)) = A000959(n).
(End)
PROG
(Scheme) (define (A264940 n) (if (= 1 (A145649 n)) 0 (if (even? n) 2 (A000959 (A260438 n))))) ;; Antti Karttunen, Sep 11 2016
CROSSREFS
Cf. A020639, A271419 (somewhat analogous sequences).
Sequence in context: A202036 A246752 A246650 * A272800 A104513 A357618
KEYWORD
nonn
AUTHOR
Max Barrentine, Dec 09 2015
EXTENSIONS
Formula corrected and comment clarified by Antti Karttunen, Sep 11 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 16:37 EDT 2024. Contains 372738 sequences. (Running on oeis4.)