login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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