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.

A275167 Pisano periods of A275124.

This page as a plain text file.
%I A275167 #10 Jun 23 2022 20:33:58
%S A275167 20,60,60,40,40,60,60,60,120,140,80,120,60,120,120,100,220,60,40,60,
%T A275167 260,120,420,140,100,240,120,120,180,120,120,180,380,120,300,180,280,
%U A275167 240,80,240,660,60,120,60,500,240,780,120,540,120,420,420,80,360,300,200,240,620,140,120,220,60,240,180,440,120,120,120,180,1140,520,120
%N A275167 Pisano periods of A275124.
%F A275167 a(n) = A001175(A275124(n)).
%e A275167 A275124(1) = 55, and PisanoPeriod(55) = 20, etc.
%o A275167 (JavaScript)
%o A275167 let bases = [],
%o A275167     Fs = [],
%o A275167     Ls = [],
%o A275167     agrees = [],
%o A275167     baselimit = 2000;
%o A275167 for (let base = 2; base <= baselimit; base++) {
%o A275167     let fibs = [1 % base,1 % base],
%o A275167         lucas = [2 % base,1 % base],
%o A275167         repeatingf = false,
%o A275167         repeatingl = false;
%o A275167     while (!repeatingf) {
%o A275167         fibs.push((fibs[fibs.length - 2] + fibs[fibs.length - 1]) % base);
%o A275167         if (1 == fibs[fibs.length - 2] &&
%o A275167             0 == fibs[fibs.length - 1])
%o A275167             repeatingf = true;
%o A275167     }
%o A275167     while (!repeatingl) {
%o A275167         lucas.push((lucas[lucas.length - 2] + lucas[lucas.length - 1]) % base);
%o A275167         if ((lucas[0] == (lucas[lucas.length - 2] + lucas[lucas.length - 1]) % base) &&
%o A275167             (lucas[1] == (lucas[lucas.length - 2] + 2 *lucas[lucas.length - 1]) % base))
%o A275167             repeatingl = true;
%o A275167     }
%o A275167     Fs[base] = fibs.length;
%o A275167     Ls[base] = lucas.length;
%o A275167     if (fibs.length != lucas.length)
%o A275167         bases.push(base);
%o A275167     //console.log('F', fibs.join(','), 'L:', lucas.join(','));
%o A275167 }
%o A275167 for (let i = 1; i <= baselimit/5; i++) {
%o A275167     if (!bases.includes(i * 5)) {
%o A275167         agrees.push(Fs[i * 5]);
%o A275167     }
%o A275167 }
%o A275167 console.log(agrees.join(','));
%Y A275167 Cf. A001175, A275124.
%K A275167 nonn
%O A275167 1,1
%A A275167 _Dan Dart_, Jul 18 2016