login
Numbers n which are both lucky (A000959) and Lucas (A000032).
0

%I #14 Mar 04 2019 07:39:59

%S 1,3,7,3571,9349,710647,12752043

%N Numbers n which are both lucky (A000959) and Lucas (A000032).

%C No more terms below 10^9.

%C Calculated using _Hugo van der Sanden_'s Lucky numbers up to 10^9.

%t 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 *)

%o (Perl) use ntheory ':all'; for (1..35) { my $n = lucasv(1, -1, $_); print "$n\n" if is_lucky($n) } # _Daniel Suteu_, Mar 02 2019

%Y Cf. A000032, A000959, A057589, A130594, A140285.

%K nonn,more

%O 1,2

%A _Amiram Eldar_, Mar 02 2019