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

A345176
a(n) = Sum_{k=1..n} floor(n/k)^k.
3
1, 3, 5, 10, 12, 26, 28, 52, 73, 115, 117, 295, 297, 439, 713, 1160, 1162, 2448, 2450, 4644, 6832, 8902, 8904, 23536, 25639, 33857, 53247, 84961, 84963, 192237, 192239, 318477, 493909, 625015, 695789, 1761668, 1761670, 2285996, 3872598, 6255230, 6255232, 13392362
OFFSET
1,2
LINKS
FORMULA
G.f.: (1/(1 - x)) * Sum_{j>=1} Sum_{k>=1} (k*x^k)^j * (1 - x^j).
a(n) ~ 3^((n - mod(n,3))/3 + 1)/2. - Vaclav Kotesovec, Jun 11 2021
MATHEMATICA
a[n_] := Sum[Floor[n/k]^k, {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Jun 10 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (n\k)^k);
(PARI) my(N=66, x='x+O('x^N)); Vec(sum(j=1, N, (1-x^j)*sum(k=1, N, (k*x^k)^j))/(1-x))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 10 2021
STATUS
approved