A284786 revision #21
|
|
A284786
|
|
Pisano period of sequence A006054 modulo n.
|
|
0
|
|
|
1, 7, 26, 14, 62, 182, 42, 28, 78, 434, 266, 182, 12, 42, 806, 56, 614, 546, 254, 434, 546, 266, 1106, 364, 310, 84, 234, 42, 28, 5642, 1986, 112, 3458, 4298, 1302, 546, 2814, 1778, 156, 868, 40, 546, 42, 266, 2418, 1106, 4514, 728, 294, 2170, 7982, 84, 5726, 1638, 8246, 84, 3302, 28, 7082, 5642, 582
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
If m and n are coprime, a(m*n) = lcm(a(m),a(n)).
If p is a prime such that the polynomial x^3-x^2-2*x+1 splits into distinct factors mod p, then a(p) divides p-1. These primes are A045472. (End)
|
|
MAPLE
|
f:= proc(n) option remember; local F, t, k, a;
F:= ifactors(n)[2];
if nops(F) > 1 then
return(ilcm(seq(procname(t[1]^t[2]), t=F)))
fi;
a:= [0, 0, 1];
for k from 1 do
a:= [a[2], a[3], 2*a[3]+a[2]-a[1] mod n];
if a = [0, 0, 1] then return k fi;
od:
end proc:
f(1):= 1:
|
|
MATHEMATICA
|
Table[FindTransientRepeat[
Mod[LinearRecurrence[{2, 1, -1}, {0, 0, 1}, 100000], n], 2] //
Last // Length, {n, 1, 20}]
|
|
CROSSREFS
|
Cf. A001175 Pisano periods of Fibonacci numbers mod n.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
reviewed
|
|
|
|