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

A344724
a(n) = Sum_{k=1..n} (-1)^(k+1) * floor(n/k)^n.
4
1, 3, 27, 240, 3094, 45990, 821484, 16711680, 387177517, 9990293423, 285263019633, 8913939911695, 302862111412779, 11111328866154037, 437889173336927557, 18446462747068745474, 827238010832411671962, 39346258082152478030126
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1,..n} Sum_{d|k} (-1)^(k/d + 1) * (d^n - (d - 1)^n).
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} (k^n - (k - 1)^n) * x^k/(1 + x^k).
a(n) ~ n^n. - Vaclav Kotesovec, May 28 2021
MATHEMATICA
a[n_] := Sum[(-1)^(k + 1) * Quotient[n, k]^n, {k, 1, n}]; Array[a, 18] (* Amiram Eldar, May 27 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*(n\k)^n);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1)*(d^n-(d-1)^n)));
CROSSREFS
Main diagonal of A344726.
Cf. A332469.
Sequence in context: A221769 A065100 A035088 * A268094 A013708 A102518
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 27 2021
STATUS
approved