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

A356240
a(n) = Sum_{k=1..n} (k-1)^n * Sum_{j=1..floor(n/k)} j^n.
1
0, 1, 9, 114, 1332, 25404, 395460, 9724901, 207584371, 6120938951, 151737244257, 5932533980409, 168400694345669, 7145593797561899, 260681076993636793, 12410128414690753548, 473029927456547840472, 27572016889372245275679
OFFSET
1,3
FORMULA
a(n) = Sum_{k=1..n} k^n * (sigma_0(k) - floor(n/k)^n) = A356239(n) - A356238(n).
a(n) = Sum_{k=1..n} k^n * Sum_{d|k} (1 - 1/d)^n.
MATHEMATICA
a[n_] := Sum[(k - 1)^n * Sum[j^n, {j, 1, Floor[n/k]}], {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Jul 30 2022 *)
PROG
(PARI) a(n) = sum(k=1, n, (k-1)^n*sum(j=1, n\k, j^n));
(PARI) a(n) = sum(k=1, n, k^n*(sigma(k, 0)-(n\k)^n));
(PARI) a(n) = sum(k=1, n, k^n*sumdiv(k, d, (1-1/d)^n));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 30 2022
STATUS
approved