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 A166038 #22 Feb 16 2025 08:33:11 %S A166038 1,3,12,18,30,12,42,18,24,30,48,36,42,42,60,36,102,24,78,90,84,48,24, %T A166038 36,30,42,72,126,84,60,312,72,48,102,210,72,84,78,84,90,48,84,66,144, %U A166038 120,24,18,36,42,30,204,126,276,72,240,126,156,84,144,180,444,312,168,144 %N A166038 Period of A022405 mod n. %C A166038 Pisano-style numbers for the recurrence b(n) = n for 0 <= n <= 2, otherwise b(n) = b(n-1)*b(n-2) - b(n-3); that is, the sequence b(n) = A022405(n+1). %H A166038 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PisanoPeriod.html">Pisano period</a>. %H A166038 Wikipedia, <a href="http://en.wikipedia.org/wiki/Pisano_period">Pisano period</a>. %o A166038 (bc) /* GNU bc */ define p(m){auto os,a,b,c,d,k;if(m<3)return 2*m-1;os=scale;scale=0;a=0;b=1;c=2;k=0;while(1){d=(c*b+m-a)%m;a=b;b=c;c=d;k+=1;if(a==0&&b==1&&c==2)break};scale=os;return k};for(i=1;i<=200;i++)print p(i),",";print"\n" %Y A166038 Cf. A001175, A022405, A046738. %K A166038 easy,nonn %O A166038 1,2 %A A166038 _Carl R. White_, Oct 05 2009