cp's OEIS Frontend

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.

A237835 a(n) = n*(Pisano period of n) divided by (Pisano period of n^2).

This page as a plain text file.
%I A237835 #19 Feb 16 2025 08:33:21
%S A237835 1,1,1,1,1,6,1,1,1,2,1,12,1,2,1,1,1,2,1,2,1,2,1,6,1,2,1,4,1,6,1,1,1,2,
%T A237835 1,4,1,2,1,1,1,6,1,1,1,2,1,3,1,2,3,2,1,2,1,4,3,2,1,12,1,2,1,1,1,6,1,2,
%U A237835 3,2,1,2,1,2,1,1,1,6,1,1,1,2,1,12,1,2,1
%N A237835 a(n) = n*(Pisano period of n) divided by (Pisano period of n^2).
%H A237835 Charles R Greathouse IV, <a href="/A237835/b237835.txt">Table of n, a(n) for n = 1..10000</a>
%H A237835 Arpan Saha and C. S. Karthik, <a href="http://arxiv.org/abs/1102.1636">A few equivalences of Wall-Sun-Sun prime conjecture</a>, arXiv:1102.1636 [math.NT], 2011.
%H A237835 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PisanoPeriod.html">Pisano period</a>.
%H A237835 Wikipedia, <a href="http://en.wikipedia.org/wiki/Pisano_period">Pisano period</a>.
%F A237835 a(n) = n/A237517(n).
%t A237835 pp[1] = 1; pp[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k+1], n] == 1, Return[k]]];
%t A237835 a[n_] := n pp[n]/pp[n^2];
%t A237835 Array[a, 100] (* _Jean-François Alcover_, Dec 06 2018 *)
%o A237835 (PARI) fibmod(n, m)=((Mod([1, 1; 1, 0], m))^n)[1, 2]
%o A237835 entry_p(p)=my(k=1, c=Mod(1, p), o); while(c, [o, c]=[c, c+o]; k++); k
%o A237835 entry(n)=if(n==1, return(1)); my(f=factor(n), v); v=vector(#f~, i, if(f[i, 1]>1e14, entry_p(f[i, 1]^f[i, 2]), entry_p(f[i, 1])*f[i, 1]^(f[i, 2] - 1))); if(f[1, 1]==2&&f[1, 2]>1, v[1]=3<<max(f[1, 2]-2, 1)); lcm(v)
%o A237835 per(n)=if(n==1, return(1)); my(k=entry(n)); forstep(i=k, n^2, k, if(fibmod(i-1, n)==1, return(i)))
%o A237835 a(n)=n*per(n)/per(n^2)
%Y A237835 Cf. A237517, A001175, A001176.
%K A237835 nonn
%O A237835 1,6
%A A237835 _Charles R Greathouse IV_, Feb 13 2014