login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
1,2
LINKS
Robert Israel, Mathematics StackExchange, When does x^3-x^2-2x+1 split mod p.
Wikipedia, Pisano period.
FORMULA
From Robert Israel, Jun 14 2017: (Start)
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:
map(f, [$1..100]); # Robert Israel, Jun 14 2017
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.
Cf. A045472.
Sequence in context: A373162 A063453 A284054 * A262109 A276614 A230399
KEYWORD
nonn
AUTHOR
Patrick D McLean, Apr 02 2017
EXTENSIONS
More terms from Robert Israel, Jun 14 2017
STATUS
approved