OFFSET
1,2
COMMENTS
It appears that a(n) <= (prime(n)^5-1)/(prime(n)-1), with equality in many cases.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Robert Israel, Minimal Period of Linear Recurrences.
EXAMPLE
a(8) = 9 because prime(3) = 5 and the recurrence has minimal period 9; e.g., with initial values 4, 7, 11, 6, 1 it continues 16, 9, 11, 5, 4, 7, 17, 6, 1, ...
MAPLE
minperiod:= proc(p)
local Q, q, F, i, z, d, k, kp, G, alpha;
Q:= z^5 - z^4 - z^3 - z^2 - z - 1;
F:= (Factors(Q) mod p)[2];
k:= infinity;
for i from 1 to nops(F) do
q:= F[i][1];
d:= degree(q);
if d = 1 then kp:= NumberTheory:-MultiplicativeOrder(p+solve(q, z), p);
else
G:= GF(p, d, q);
alpha:= G:-ConvertIn(z);
kp:= G:-order(alpha);
fi;
k:= min(k, kp);
od;
k;
end proc:
map(minperiod, [seq(ithprime(i), i=1..100)]);
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Robert Israel, Mar 28 2024
STATUS
approved