login
A049783
Triangular array T read by rows: T(n,k) = Sum_{j=1..k} (n mod floor(k/j)) for n, k >= 1.
7
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, 0, 0, 2, 0, 3, 4, 3, 0, 0, 1, 0, 2, 5, 4, 3, 4, 2, 0, 0, 1, 2, 0, 5, 4, 4, 4, 1, 0, 1, 2, 4, 2, 8, 7, 8, 8, 6, 5, 0, 0, 0, 0, 2, 0, 5, 4, 3, 4, 3, 0, 0, 1, 1, 2, 4, 3, 8, 8, 7, 9, 8, 6, 5
OFFSET
1,13
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
STATUS
approved