login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
0
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,4
EXAMPLE
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.
PROG
(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
CROSSREFS
Sequence in context: A128218 A010283 A134699 * A331286 A272880 A003636
KEYWORD
nonn,tabf
AUTHOR
Mike Jones, Jul 30 2024
EXTENSIONS
More terms from Michel Marcus, Jul 31 2024
STATUS
approved