OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..387
FORMULA
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} x^k / (1 - n*x^k).
a(n) = (1/n) * Sum_{k=1..n} Sum_{d|k} n^d.
a(n) ~ n^(n-1). - Vaclav Kotesovec, May 28 2021
a(n) = (1/(n-1)) * Sum_{k=1..n} (n^floor(n/k) - 1), for n>=2. - Ridouane Oudra, Mar 05 2023
MAPLE
seq(add(n^(k-1)*floor(n/k), k=1..n), n=1..60); # Ridouane Oudra, Mar 05 2023
MATHEMATICA
Table[(1/n) Sum[Floor[n/k] n^k, {k, 1, n}], {n, 1, 20}]
Table[(1/n) Sum[Sum[n^d, {d, Divisors[k]}], {k, 1, n}], {n, 1, 20}]
Table[SeriesCoefficient[(1/(1 - x)) Sum[x^k/(1 - n x^k), {k, 1, n}], {x, 0, n}], {n, 1, 20}]
PROG
(PARI) a(n) = sum(k=1, n, (n\k)*n^k)/n; \\ Michel Marcus, Feb 16 2020
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, n^(d-1))); \\ Seiichi Manyama, May 29 2021
(Magma)
A332533:= func< n | (&+[Floor(n/j)*n^(j-1): j in [1..n]]) >;
[A332533(n): n in [1..40]]; // G. C. Greubel, Jun 27 2024
(SageMath)
def A332533(n): return sum((n//j)*n^(j-1) for j in range(1, n+1))
[A332533(n) for n in range(1, 41)] # G. C. Greubel, Jun 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 16 2020
STATUS
approved