OFFSET
1,13
LINKS
G. C. Greubel, Rows n = 1..100 of triangle, flattened
EXAMPLE
Triangle T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:
0;
0, 0;
0, 1, 0;
0, 0, 1, 0;
0, 1, 2, 2, 1;
0, 0, 0, 2, 1, 0;
0, 1, 1, 4, 3, 3, 2;
...
MAPLE
seq(seq( add(`mod`(n, floor(k/j)), j=1..k), k=1..n), n=1..15); # G. C. Greubel, Dec 12 2019
MATHEMATICA
Table[Sum[Mod[n, Floor[k/j]], {j, k}], {n, 15}, {k, n}] (* G. C. Greubel, Dec 12 2019 *)
PROG
(PARI) T(n, k) = sum(j=1, k, lift(Mod(n, k\j)));
for(n=1, 15, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Dec 12 2019
(Magma) [ &+[(n mod Floor(k/j)): j in [1..k]]: k in [1..n], n in [1..15]]; // G. C. Greubel, Dec 12 2019
(Sage) [[sum( n%floor(k/j) for j in (1..k)) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Dec 12 2019
(GAP) Flat(List([1..15], n-> List([1..n], k-> Sum([1..k], j-> n mod Int(k/j)) ))); # G. C. Greubel, Dec 12 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved