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.

A284786 Pisano period of sequence A006054 modulo n.

Original entry on oeis.org

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

Views

Author

Patrick D McLean, Apr 02 2017

Keywords

Crossrefs

Cf. A001175 Pisano periods of Fibonacci numbers mod n.
Cf. A045472.

Programs

  • 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}]

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)

Extensions

More terms from Robert Israel, Jun 14 2017