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.

A307662 Triangle T(i,j=1..i) read by rows which contain the naturally ordered divisors-or-ones of the row number i.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 2, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 2, 1, 4, 1, 1, 1, 8, 1, 1, 3, 1, 1, 1, 1, 1, 9, 1, 2, 1, 1, 5, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 2, 3, 4, 1, 6, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

I. V. Serov, Apr 20 2019

Keywords

Comments

Replace 0 with 1 in A127093. - Omar E. Pol, Apr 21 2019

Examples

			Triangle begins:
  1,
  1, 2,
  1, 1, 3,
  1, 2, 1, 4,
  1, 1, 1, 1, 5,
  1, 2, 3, 1, 1, 6,
  1, 1, 1, 1, 1, 1, 7,
  1, 2, 1, 4, 1, 1, 1, 8,
  1, 1, 3, 1, 1, 1, 1, 1, 9,
  1, 2, 1, 1, 5, 1, 1, 1, 1,10,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,11,
  1, 2, 3, 4, 1, 6, 1, 1, 1, 1, 1,12,
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Map[If[Mod[n, #] == 0, #, 1] &, Range@ n], {n, 13}] // Flatten (* Michael De Vlieger, Apr 23 2019 *)
  • PARI
    row(n) = vector(n, k, if ((n % k) == 0, k, 1)); \\ Michel Marcus, Apr 21 2019

Formula

For j=1..floor(i/2), T(i,j)=T(i-j,j).
For j=floor(i/2)+1..i-1, T(i,j)=1.
T(i,i) = i.
Let i = A002024(n) and j = A002260(n):
a(n) = a((i-j-1)*(i-j)/2+j) if j=1..floor(i/2).
a(n) = 1 if j=floor(i/2)+1..i-1.
a(n) = i if j=i.
T(i,j) = a(n).