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.

A375117 Irregular triangle of positive integers, read by rows, the elements of the n-th row being the nonzero remainders, in increasing order, when the Euclidean algorithm is applied to 2^n-1 and n.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 1, 7, 1, 2, 7, 1, 3, 1, 3, 1, 1, 2, 3, 1, 7, 1, 15, 1, 9, 1, 5, 15, 7, 1, 3, 1, 3, 6, 9, 15, 1, 6, 1, 2, 3, 1, 2, 25, 1, 2, 13, 15, 1, 3, 1, 1, 31, 1, 2, 5, 7, 1, 3, 1, 17, 9, 27, 1, 1, 2, 3, 1, 3, 4, 7, 5, 10, 15, 1, 21, 1, 1, 14, 15, 1, 3, 13, 16
Offset: 2

Views

Author

Mike Jones, Jul 30 2024

Keywords

Examples

			The triangle begins:
    1;
    1;
    1, 3;
    1;
    3;
    1;
    1, 7;
    1, 2, 7;
    1, 3;
    1;
    3;
    1;
    3;
    ...
Row(2) is {1}, because 2^2-1 = 4-1 = 3, and 3 divided by 2 leaves a remainder of 1.
Row(4) is {1, 3}, because 2^4-1 = 16-1 = 15, and 15 divided by 4 leaves a remainder of 3, and 4 divided by 3 leaves a remainder of 1.
		

Crossrefs

Programs

  • PARI
    row(n) = my(x=2^n-1, y=n, ok=1, list=List()); while (ok, my(z=divrem(x, y)); x = y; y = z[2]; if (y==0, ok=0, listput(list, y));); listsort(list); Vec(list); \\ Michel Marcus, Jul 31 2024

Extensions

More terms from Michel Marcus, Jul 31 2024