Fibonacci Prime

Author

Eric W. Weisstein
November 7, 2017

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/FibonacciPrime.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FibonacciPrime.html.

©2017 Wolfram Research, Inc. except for portions noted otherwise

Primes

A001605

Slowest:

Position[Fibonacci[Range[10^4]],_?PrimeQ]//Flatten//Timing

Next slowest:

Select[Range[10^4],PrimeQ[Fibonacci[#]]&]//Timing

Fastest:

Select[Range[10^4],PrimeQ[#]&&PrimeQ[Fibonacci[#]]&]//Timing

Select[Prime[Range[PrimePi[10^4]]],PrimeQ[Fibonacci[#]]&]//Timing

71.358687`/39.995741`

Table

Length[l={3,4,5,7,11,13,17,23,29,43,47,83,131,137,359,431,433,449,509,569,571,2971,4723,5387,9311,9677,14431,25561,30757,35999,37511,50833,81839,104911,130021,148091,201107,397379,433781,590041,593689,604711,931517,1049897,1285607,1636007,1803059,1968721,2904353,3244369}]

Grid[MapIndexed[{#2[[1]],#,IntegerLength[Fibonacci[#]]}&,l],Dividers->All,Alignment->{Automatic,{Decimal}}]//TraditionalForm

Do[
Print[{n,l[[n]],PrimeQ[Fibonacci[l[[n]]]]//Timing}],
{n,Length[l]}
]