A302990 a(n) = index of first odd prime number in the (n-th)-order Fibonacci sequence Fn, or 0 if no such index exists.
0, 0, 4, 6, 9, 10, 40, 14, 17, 19, 361, 23, 90, 26, 373, 47, 288, 34, 75, 38, 251, 43, 67, 47, 74, 310, 511, 151534, 57, 20608, 1146, 62, 197, 94246, 9974, 287, 271172, 758
Offset: 0
Examples
a(2) = 4 because F2 (Fibonacci) = 0, 1, 1, 2, 3, 5, 8, ... and F2(4) = 3 is prime. a(3) = 6 because F3 (tribonacci) = 0, 0, 1, 1, 2, 4, 7, 13, ... and F3(6) = 7 is prime. a(4) = 9 because F4 (tetranacci) = 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, ... and F4(9) = 29 is prime. From _M. F. Hasler_, Apr 18 2018: (Start) We see that Fn(k) = 2^(k-n) for n <= k < 2n and thus Fn(2n) = 2^n-1, so a(n) = 2n exactly for the Mersenne prime exponents A000043. a(n) = 2n + 1 when 2^(n+1) - 3 is prime (n+1 in A050414) but 2^n-1 is not, i.e., n = 4, 8, 9, 11, 21, 23, 28, 93, 115, 121, 149, 173, 212, 220, 232, 265, 335, 451, 544, 688, 693, 849, 1735, ... For other primes we have: a(29) = 687*30 - 2, a(37) = 20*38 - 2, a(41) > 10^4, a(43) > 10^4, a(47) = 5*48 - 1, a(53) = 53*54 - 2, a(59) = 307*60 - 2, a(67) = 6*67 - 1. (End)
Crossrefs
Programs
-
PARI
A302990(n,L=oo,a=vector(n+1,i,if(i
1 && for(i=-2+2*n+=1,L, ispseudoprime(a[i%n+1]=2*a[(i-1)%n+1]-a[i%n+1]) && return(i))} \\ Testing primality only for i%n>n-3 is not faster, even for large n. - M. F. Hasler, Apr 17 2018; improved Apr 18 2018
Formula
a(n) == -1 or -2 (mod n+1). a(n) >= 2n, with equality iff n is in A000043. a(n) <= 2n+1 for n+1 in A050414. - M. F. Hasler, Apr 18 2018
Extensions
a(29) from Jacques Tramu, Apr 19 2018
a(33) from Daniel Suteu, Apr 20 2018
a(36) from Jacques Tramu, Apr 25 2018
Comments