login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A306632
Numbers n which are both lucky (A000959) and Lucas (A000032).
0
1, 3, 7, 3571, 9349, 710647, 12752043
OFFSET
1,2
COMMENTS
No more terms below 10^9.
Calculated using Hugo van der Sanden's Lucky numbers up to 10^9.
MATHEMATICA
m = 10^4; L = Table[2*i + 1, {i, 0, m}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; lucas = {}; n = 1; While[(l = LucasL[n]) < m, AppendTo[lucas, l]; n++]; Intersection[L, lucas] (* after Jean-François Alcover at A000959 *)
PROG
(Perl) use ntheory ':all'; for (1..35) { my $n = lucasv(1, -1, $_); print "$n\n" if is_lucky($n) } # Daniel Suteu, Mar 02 2019
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Mar 02 2019
STATUS
approved