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.

A376081 Irregular triangle read by rows: row n is the periodic part of the Leonardo numbers (A001595) modulo n.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Sep 09 2024

Keywords

Comments

Each row n >= 3 ends in (1, n-1) (see Wikipedia article).

Examples

			Triangle begins:
  [1]  0;
  [2]  1;
  [3]  1, 1, 0, 2, 0, 0, 1, 2;
  [4]  1, 1, 3;
  [5]  1, 1, 3, 0, 4, 0, 0, 1, 2, 4, 2, 2, 0, 3, 4, 3, 3, 2, 1, 4;
  [6]  1, 1, 3, 5, 3, 3, 1, 5;
  [7]  1, 1, 3, 5, 2, 1, 4, 6, 4, 4, 2, 0, 3, 4, 1, 6;
  [8]  1, 1, 3, 5, 1, 7;
  [9]  1, 1, 3, 5, 0, 6, 7, 5, 4, 1, 6, 8, 6, 6, 4, 2, 7, 1, 0, 2, 3, 6, 1, 8;
  ...
For n = 8:
A001595       = 1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, ...
A001595 mod 8 = 1, 1, 3, 5, 1,  7,  1,  1,  3,   5,   1,   7,   1, ...
                \_______________/
                  periodic part
		

Crossrefs

Cf. A001595, A161553, A376082 (row lengths), A376083 (row sums).

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[A376081row, 10]

Formula

T(n,k) = A001595(k) mod n, with 0 <= k < A376082(n).