OFFSET
2,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = Sum_{j=1..n-2} mod(n-1, floor((n-2)/j)). - G. C. Greubel, Dec 12 2019
MAPLE
seq( add(`mod`(n-1, floor((n-2)/j)), j=1..n-2), n=2..70); # G. C. Greubel, Dec 12 2019
MATHEMATICA
Table[Sum[Mod[n-1, Floor[(n-2)/j]], {j, n-2}], {n, 2, 70}] (* G. C. Greubel, Dec 12 2019 *)
PROG
(PARI) vector(70, n, sum(j=1, n-1, lift(Mod(n, (n-1)\j))) ) \\ G. C. Greubel, Dec 12 2019
(Magma) [0] cat [ &+[((n-1) mod Floor((n-2)/j)): j in [1..n-2]]: n in [3..70]]; // G. C. Greubel, Dec 12 2019
(Sage) [sum( (n-1)%floor((n-2)/j) for j in (1..n-2)) for n in (2..70)] # G. C. Greubel, Dec 12 2019
(GAP) List([2..70], n-> Sum([1..n-2], j-> (n-1) mod Int((n-2)/j)) ); # G. C. Greubel, Dec 12 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved