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.

A123229 Triangle read by rows: T(n, m) = n - (n mod m).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 06 2006

Keywords

Comments

An equivalent definition: Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127093 from the right. That is, T(n,m) = Sum_{j=m..n} A000012(n,j)*A127093(j,m) = Sum_{j=m..n} A127093(j,m) = m*floor(n/m) = m*A010766(n,m). - Gary W. Adamson, Jan 05 2007
The number of parts k in the triangle is A000203(k) hence the sum of parts k is A064987(k). - Omar E. Pol, Jul 05 2014

Examples

			Triangle begins:
{1},
{2, 2},
{3, 2, 3},
{4, 4, 3, 4},
{5, 4, 3, 4, 5},
{6, 6, 6, 4, 5, 6},
{7, 6, 6, 4, 5, 6, 7},
{8, 8, 6, 8, 5, 6, 7, 8},
{9, 8, 9, 8, 5, 6, 7, 8, 9},
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # Muniru A Asiru, Oct 12 2018
  • Maple
    seq(seq(n-modp(n,m),m=1..n),n=1..13); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]
  • PARI
    for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ Charles R Greathouse IV, Nov 07 2011
    

Extensions

Edited by N. J. A. Sloane, Jul 05 2014 at the suggestion of Omar E. Pol, who observed that A127095 (Gary W. Adamson, with edits by R. J. Mathar) was the same as this sequence.