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.

Showing 1-3 of 3 results.

A161553 Table which contains in row n the fundamental Pisano period of the Fibonacci sequence (mod n).

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1, 2, 3, 5, 2, 1, 3, 4, 1, 5, 0, 5, 5, 4, 3, 1, 4, 5, 3, 2, 5, 1, 0, 1, 1, 2, 3, 5, 1, 6, 0, 6, 6, 5, 4, 2, 6, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 0, 8, 8
Offset: 1

Views

Author

Alexander Adamchuk, Jun 13 2009

Keywords

Comments

The length of the n-th row (the length of the period) is A001175(n).

Examples

			F(n) mod 1 {0},
F(n) mod 2 {0,1,1},
F(n) mod 3 {0,1,1,2,0,2,2,1},
F(n) mod 4 {0,1,1,2,3,1},
F(n) mod 5 {0,1,1,2,3,0,3,3,1,4,0,4,4,3,2,0,2,2,4,1},
F(n) mod 6 {0,1,1,2,3,5,2,1,3,4,1,5,0,5,5,4,3,1,4,5,3,2,5,1},
F(n) mod 7 {0,1,1,2,3,5,1,6,0,6,6,5,4,2,6,1},
F(n) mod 8 {0,1,1,2,3,5,0,5,5,2,7,1},
F(n) mod 9 {0,1,1,2,3,5,8,4,3,7,1,8,0,8,8,7,6,4,1,5,6,2,8,1},
F(n) mod 10 {0,1,1,2,3,5,8,3,1,4,5,9,4,3,7,0,7,7,4,1,5,6,1,7,8,5,3,8, 1,9,0,9,9,8,7,5,2,7,9,6,5,1,6,7,3,0,3,3,6,9,5,4,9,3,2,5,7,2,9,1}.
		

Crossrefs

Main diagonal gives A002708.
Row sums give A214300.

Programs

  • Mathematica
    per[1] = 1; per[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k + 1], n] == 1, Return[k]]];
    row[n_] := Table[Mod[Fibonacci[k], n], {k, 0, per[n]-1}];
    Array[row, 9] // Flatten (* Jean-François Alcover, Oct 30 2018 *)
  • PARI
    row(n)={my(L=List([0]), X=Mod([1,1;1,0],n), I=Mod([1,0;0,1],n), M=X); while(M<>I, M*=X; listput(L, lift(M[2,2]))); Vec(L)} \\ Andrew Howroyd, Mar 05 2023

Extensions

Moved into the keyword:tabf category by R. J. Mathar, Oct 04 2009

A088551 Fibonacci winding number: the number of 'mod n' operations in one cycle of the Fibonacci sequence modulo n.

Original entry on oeis.org

1, 3, 2, 8, 11, 7, 4, 11, 28, 3, 9, 12, 23, 19, 9, 16, 11, 7, 28, 5, 12, 23, 9, 48, 40, 35, 19, 4, 59, 12, 19, 15, 16, 39, 9, 36, 6, 27, 28, 19, 19, 43, 11, 59, 23, 15, 9, 55, 148, 35, 38, 52, 35, 6, 21, 31, 16, 26, 57, 28, 12, 21, 43, 68, 51, 67, 14, 19, 119, 32, 7, 72, 112, 99, 5, 33
Offset: 2

Views

Author

R C Johnson (bob.johnson(AT)dur.ac.uk), Nov 19 2003

Keywords

Comments

If pi(n) is the n-th Pisano number (A001175) then a(n) is usually about pi(n)/2 - and in any case a(n) > pi(n)/4.

Examples

			a(8)=4 because one cycle of the Fibonacci numbers modulo 8 is 0, 1, 1, 2, 3, 5; 0, 5, 5; 2, 7; 1; - including 4 'mod 8' operations, each marked with a semi-colon.
		

Crossrefs

Programs

  • Mathematica
    (* pp = Pisano period = A001175 *) pp[1] = 1;
    pp[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k + 1], n] == 1, Return[k]]];
    a[n_] := Sum[Mod[Fibonacci[k], n], {k, 1, pp[n]}]/n;
    Table[a[n], {n, 2, 77}] (* Jean-François Alcover, Sep 05 2017 *)

Formula

n*a(n) = sum{k=1..A001175(n)} fibonacci(k) mod n. [Mircea Merca, Jan 03 2011]

Extensions

More terms from T. D. Noe
Edited by Ray Chandler, Oct 26 2006

A376083 Row sums of A376081.

Original entry on oeis.org

0, 1, 7, 5, 40, 22, 47, 18, 93, 100, 45, 132, 180, 110, 275, 84, 304, 210, 134, 580, 131, 78, 527, 240, 1200, 388, 927, 652, 160, 590, 373, 328, 587, 644, 1355, 444, 1404, 286, 1075, 1140, 821, 278, 1847, 542, 2625, 1102, 767, 504, 2681, 2500, 1815, 2204, 2860
Offset: 1

Views

Author

Paolo Xausa, Sep 10 2024

Keywords

Comments

See A376081 for more information.

Crossrefs

Programs

  • Mathematica
    A376081row[n_] := If[n < 3, {n - 1}, Module[{k = 1}, NestWhileList[Mod[2 * Fibonacci[++k] - 1, n] &, 1, {#, #2} != {1, n-1} &, {3, 2}]]];
    Array[Total[A376081row[#]] &, 100]

Formula

a(n) = Sum_{k = 0..A376082(n)-1} A376081(n,k).
Showing 1-3 of 3 results.