OFFSET
1,1
COMMENTS
If a(n) > 0, then prime(a(n)) = A335568(n).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..30000
EXAMPLE
a(15) = 7 because F(15)^2 + 1 = 610^2 + 1 = 372101 = 233*1597, 1597 = F(17) is the greatest prime Fibonacci divisor of 372101 and 17 is the 7th prime.
MAPLE
a:= proc(n) local i, F, m, t; F, m, t:=
[1, 2], 0, (<<0|1>, <1|1>>^n)[2, 1]^2+1;
for i from 3 while F[2]<=t do if isprime(F[2]) and
irem(t, F[2])=0 then m:=i fi; F:= [F[2], F[1]+F[2]]
od; numtheory[pi](m)
end:
seq(a(n), n=1..100); # Alois P. Heinz, Nov 25 2020
MATHEMATICA
a[n_] := Module[{i, F = {1, 2}, m = 0, t}, t = MatrixPower[{{0, 1}, {1, 1}}, n][[2, 1]]^2 + 1; For[i = 3, F[[2]] <= t, i++, If[PrimeQ[F[[2]]] && Mod[t, F[[2]]] == 0, m = i]; F = {F[[2]], F[[1]] + F[[2]]}]; PrimePi[m]];
Array[a, 100] (* Jean-François Alcover, Dec 01 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Nov 24 2020
STATUS
approved