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

a(n) = Sum_{k=1..n} (k - 1)^n * floor(n/k).
2

%I #19 Dec 14 2024 12:24:34

%S 0,1,9,99,1301,20581,376891,7914216,186905206,4915451602,142368695176,

%T 4506118905870,154720069309364,5729167232515112,227585086051159866,

%U 9654819212943764500,435659280972794395356,20836049921760968809231,1052864549462731148832219

%N a(n) = Sum_{k=1..n} (k - 1)^n * floor(n/k).

%F a(n) = A319194(n) - A332469(n).

%F a(n) = Sum_{k=1..n} Sum_{d|k} (d - 1)^n.

%F a(n) = [x^n] (1/(1-x)) * Sum_{k>=1} (k - 1)^n * x^k/(1 - x^k).

%t Table[Sum[(k-1)^n Floor[n/k],{k,n}],{n,20}] (* _Harvey P. Dale_, Dec 14 2024 *)

%o (PARI) a(n) = sum(k=1, n, (k-1)^n*(n\k));

%o (PARI) a(n) = sum(k=1, n, sigma(k, n)-(n\k)^n);

%o (PARI) a(n) = sum(k=1, n, sumdiv(k, d, (d-1)^n));

%o (Python)

%o def A356100(n): return sum((k-1)**n*(n//k) for k in range(2,n+1)) # _Chai Wah Wu_, Jul 26 2022

%Y Cf. A121706, A236632, A319194, A332469.

%K nonn,changed

%O 1,3

%A _Seiichi Manyama_, Jul 26 2022