login
A049785
a(n) = Sum_{k=1..n} (n mod floor(n/k)) = T(n,n), array T as in A049783.
7
0, 0, 0, 0, 1, 0, 2, 0, 2, 1, 5, 0, 5, 4, 3, 2, 9, 2, 10, 4, 6, 7, 17, 0, 10, 11, 13, 6, 19, 4, 18, 10, 15, 18, 21, 2, 19, 22, 27, 8, 27, 10, 30, 20, 17, 22, 44, 6, 28, 21, 29, 22, 47, 21, 34, 17, 28, 35, 63, 8, 37, 44, 38, 28, 43, 19, 51, 41, 55, 29
OFFSET
1,7
LINKS
MAPLE
seq( add(`mod`(n, floor(n/j)), j=1..n), n=1..70); # G. C. Greubel, Dec 12 2019
MATHEMATICA
Table[Sum[Mod[n, Floor[n/j]], {j, n}], {n, 70}] (* G. C. Greubel, Dec 12 2019 *)
PROG
(PARI) vector(70, n, sum(j=1, n, lift(Mod(n, n\j))) ) \\ G. C. Greubel, Dec 12 2019
(Magma) [ &+[(n mod Floor(n/j)): j in [1..n]]: n in [1..70]]; // G. C. Greubel, Dec 12 2019
(Sage) [sum( n%floor(n/j) for j in (1..n)) for n in (1..70)] # G. C. Greubel, Dec 12 2019
(GAP) List([1..70], n-> Sum([1..n], j-> n mod Int(n/j)) ); # G. C. Greubel, Dec 12 2019
CROSSREFS
KEYWORD
nonn
STATUS
approved