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
PROG
(Scheme) (define (A264940 n) (if (= 1 (A145649 n)) 0 (if (even? n) 2 (A000959 (A260438 n))))) ;; Antti Karttunen, Sep 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Barrentine, Dec 09 2015
EXTENSIONS
Formula corrected and comment clarified by Antti Karttunen, Sep 11 2016
STATUS
approved