A123229 Triangle read by rows: T(n, m) = n - (n mod m).
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
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}, ...
Links
- G. C. Greubel, Rows n=1..100 of triangle, flattened
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.
Comments