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

%I #27 Oct 13 2018 07:21:29

%S 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,

%T 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,

%U 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

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

%C 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

%C 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

%H G. C. Greubel, <a href="/A123229/b123229.txt">Rows n=1..100 of triangle, flattened</a>

%e Triangle begins:

%e {1},

%e {2, 2},

%e {3, 2, 3},

%e {4, 4, 3, 4},

%e {5, 4, 3, 4, 5},

%e {6, 6, 6, 4, 5, 6},

%e {7, 6, 6, 4, 5, 6, 7},

%e {8, 8, 6, 8, 5, 6, 7, 8},

%e {9, 8, 9, 8, 5, 6, 7, 8, 9},

%e ...

%p seq(seq(n-modp(n,m),m=1..n),n=1..13); # _Muniru A Asiru_, Oct 12 2018

%t a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]

%o (PARI) for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ _Charles R Greathouse IV_, Nov 07 2011

%o (GAP) Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # _Muniru A Asiru_, Oct 12 2018

%Y Cf. A074025, A093960.

%Y Cf. also A024916 (row sums), A127093, A127094, A127096, A127097, A127098, A127099, A038040, A000203, A126988, A127013, A127057.

%K nonn,tabl,easy

%O 1,2

%A _Roger L. Bagula_ and _Gary W. Adamson_, Oct 06 2006

%E 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.