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

A367493
a(n) = Sum_{d|n} (n-d)^n.
2
0, 1, 8, 97, 1024, 20450, 279936, 7509953, 144295424, 4570291850, 100000000000, 4491754172274, 106993205379072, 5221973073321002, 171975117132398592, 8931527427394008833, 295147905179352825856, 20290116242888952838355, 708235345355337676357632, 51879761166564630630389778
OFFSET
1,3
FORMULA
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*n^(n-k)*sigma_k(n).
MATHEMATICA
a[n_]:=Sum[(n-d)^n, {d, Divisors[n]}]; Array[a, 20] (* Stefano Spezia, Nov 20 2023 *)
PROG
(Python)
from sympy import divisors
def A367493(n): return sum((n-d)**n for d in divisors(n, generator=True))
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Nov 20 2023
STATUS
approved