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”).

A350125
a(n) = Sum_{k=1..n} k^2 * floor(n/k)^n.
6
1, 8, 40, 345, 3303, 50225, 833569, 17045934, 388654659, 10039636255, 285508661853, 8924967326015, 302927979357701, 11114722212099135, 437913155876193839, 18447871416712820782, 827249276230172525622, 39347009369000530723017
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} k^2 * Sum_{d|k} (d^n - (d - 1)^n)/d^2.
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} (k^n - (k - 1)^n) * x^k * (1 + x^k)/(1 - x^k)^3.
a(n) ~ n^n. - Vaclav Kotesovec, Dec 16 2021
MATHEMATICA
a[n_] := Sum[k^2 * Floor[n/k]^n, {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Oct 04 2023 *)
PROG
(PARI) a(n) = sum(k=1, n, k^2*(n\k)^n);
(PARI) a(n) = sum(k=1, n, k^2*sumdiv(k, d, (d^n-(d-1)^n)/d^2));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 15 2021
STATUS
approved