login
A049786
a(n) = T(n,n-1), array T as in A049783.
7
0, 0, 1, 1, 2, 1, 3, 3, 4, 4, 6, 3, 6, 7, 8, 6, 10, 8, 11, 9, 11, 10, 18, 10, 12, 14, 18, 14, 20, 12, 19, 19, 20, 21, 30, 13, 20, 25, 32, 21, 28, 18, 31, 29, 28, 25, 45, 25, 30, 31, 34, 30, 48, 37, 43, 28, 33, 38, 64, 29, 38, 47, 53, 37, 50, 32
OFFSET
2,5
LINKS
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
STATUS
approved