login
Numbers k such that the k-th Fibonacci number reversed is prime.
3

%I #44 Aug 25 2021 03:25:14

%S 3,4,5,7,9,14,17,21,25,26,65,98,175,191,382,497,653,1577,1942,1958,

%T 2405,4246,4878,5367,9142,9318,10921,17833,20433,50373,66571,85098,

%U 93699,104075

%N Numbers k such that the k-th Fibonacci number reversed is prime.

%C Numbers k such that the k-th Fibonacci number appears in A095179. - _Iain Fox_, Oct 28 2017

%p revdigs:= proc(n) local L;

%p L:= convert(n,base,10);

%p add(L[-i]*10^(i-1),i=1..nops(L))

%p end proc:

%p select(isprime@revdigs@combinat:-fibonacci, [$1..10000]); # _Robert Israel_, Oct 29 2017

%t a = Table[FromDigits[Reverse[IntegerDigits[Fibonacci[j]]]], {j, 10000}]; b = Select[a, PrimeQ[ # ] &]; Flatten[Table[Position[a, b[[i]]], {i, 1, Length[b]}]]

%t Select[Range[9400],PrimeQ[IntegerReverse[Fibonacci[#]]]&] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* _Harvey P. Dale_, Dec 08 2015 *)

%o (PARI) lista(nn) = for(n=3, nn, if(ispseudoprime(eval(concat(Vecrev(Str(fibonacci(n)))))), print1(n, ", "))) \\ _Iain Fox_, Oct 28 2017

%Y Cf. A036797, A036972, A095179.

%K nonn,base,more

%O 1,1

%A _G. L. Honaker, Jr._, _Carlos Rivera_

%E a(25)-a(26) from Vit Planocka (planocka(AT)mistral.cz), Feb 25 2003

%E Offset corrected by _Arkadiusz Wesolowski_, Jan 12 2012

%E a(27)-a(31) from _Iain Fox_, Oct 28 2017

%E a(32)-a(33) from _Iain Fox_, Oct 29 2017

%E a(34) from _Iain Fox_, Aug 24 2021