OFFSET
2,1
COMMENTS
Record values: a(2) = 2, a(5) = 10, a(11) = 12, a(29) = 16, a(71) = 36, a(3079) = 58. The next record a(n), if any has n > 10^5. - Robert Israel, Oct 14 2024
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
FORMULA
a(3n)=1; a( A047235(n))=2
MAPLE
fibmod:= proc(k, m) uses LinearAlgebra:-Modular;
local M;
M:= Mod(m, <<0, 1>|<1, 1>>, integer[8]);
MatrixPower(m, M, k)[1, 2]
end proc:
f:= proc(n) local k;
for k from 2 do if fibmod(k*n^2+1, k) <> fibmod(k+1, k) then return k-1 fi od
end proc:
map(f, [$2..100]); # Robert Israel, Oct 14 2024
PROG
(PARI) a(n)=if(n<0, 0, m=1; while((fibonacci(m*n^2+1)-fibonacci(m+1))%m==0, m++); m-1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 06 2003
STATUS
approved