This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A284786 #26 May 20 2019 15:31:02 %S A284786 1,7,26,14,62,182,42,28,78,434,266,182,12,42,806,56,614,546,254,434, %T A284786 546,266,1106,364,310,84,234,42,28,5642,1986,112,3458,4298,1302,546, %U A284786 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 %N A284786 Pisano period of sequence A006054 modulo n. %H A284786 Robert Israel, Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/2322702">When does x^3-x^2-2x+1 split mod p</a>. %H A284786 Wikipedia, <a href="https://en.wikipedia.org/wiki/Pisano_period">Pisano period</a>. %F A284786 From _Robert Israel_, Jun 14 2017: (Start) %F A284786 If m and n are coprime, a(m*n) = lcm(a(m),a(n)). %F A284786 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) %p A284786 f:= proc(n) option remember; local F, t, k, a; %p A284786 F:= ifactors(n)[2]; %p A284786 if nops(F) > 1 then %p A284786 return(ilcm(seq(procname(t[1]^t[2]),t=F))) %p A284786 fi; %p A284786 a:= [0,0,1]; %p A284786 for k from 1 do %p A284786 a:= [a[2],a[3],2*a[3]+a[2]-a[1] mod n]; %p A284786 if a = [0,0,1] then return k fi; %p A284786 od: %p A284786 end proc: %p A284786 f(1):= 1: %p A284786 map(f, [$1..100]); # _Robert Israel_, Jun 14 2017 %t A284786 Table[FindTransientRepeat[ %t A284786 Mod[LinearRecurrence[{2, 1, -1}, {0, 0, 1}, 100000], n], 2] // %t A284786 Last // Length, {n, 1, 20}] %Y A284786 Cf. A001175 Pisano periods of Fibonacci numbers mod n. %Y A284786 Cf. A045472. %K A284786 nonn %O A284786 1,2 %A A284786 _Patrick D McLean_, Apr 02 2017 %E A284786 More terms from _Robert Israel_, Jun 14 2017