login
This site is supported by donations 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

Max Barrentine, Table of n, a(n) for n = 1..10000

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. A000959, A050505, A145649, A219178, A255543, A255545, A260438, A265859.

Cf. A020639, A271419 (somewhat analogous sequences).

Sequence in context: A202036 A246752 A246650 * A272800 A104513 A305610

Adjacent sequences:  A264937 A264938 A264939 * A264941 A264942 A264943

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 13:58 EDT 2019. Contains 325254 sequences. (Running on oeis4.)