%I #33 Sep 12 2016 17:01:17
%S 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,
%T 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,
%U 2,0,2,3,2,0,2,0,2,3,2,0,2,7,2,3,2,21,2
%N Lucky factor of n.
%C 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.
%H Max Barrentine, <a href="/A264940/b264940.txt">Table of n, a(n) for n = 1..10000</a>
%F From _Antti Karttunen_, Sep 11 2016: (Start)
%F 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)).
%F For n >= 2, a(A219178(n)) = A000959(n).
%F (End)
%o (Scheme) (define (A264940 n) (if (= 1 (A145649 n)) 0 (if (even? n) 2 (A000959 (A260438 n))))) ;; _Antti Karttunen_, Sep 11 2016
%Y Cf. A000959, A050505, A145649, A219178, A255543, A255545, A260438, A265859.
%Y Cf. A020639, A271419 (somewhat analogous sequences).
%K nonn
%O 1,2
%A _Max Barrentine_, Dec 09 2015
%E Formula corrected and comment clarified by _Antti Karttunen_, Sep 11 2016