OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
Robert Israel, Linear Recurrences with a Single Minimal Period
EXAMPLE
a(3) = 94307 is a term because 94307 is prime, z^5 - z^4 - z^3 - z^2 - z - 1 = (z + 11827)*(z + 78583)*(z + 54610)*(z + 14536)*(z + 29057) (mod 94307), and the recurrence has period 47153 for all initial conditions except (0,0,0,0,0), as -11827, -78583, -54610, -14536, and -29057 all have multiplicative order 47153 (mod 94307).
MAPLE
filter:= proc(p) local Q, q, F, i, z, d, k, kp, G, alpha;
if not isprime(p) then return false fi;
Q:= z^5 - z^4 - z^3 - z^2 - z - 1;
if Irreduc(Q) mod p then return false fi;
F:= (Factors(Q) mod p)[2];
if ormap(t -> t[2]>1, F) then return false fi;
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;
if i = 1 then k:= kp
elif kp <> k then return false
fi;
od;
true
end proc:
select(filter, [seq(i, i=3 .. 10^7, 2)]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Mar 28 2024
STATUS
approved