login
a(n) = Sum_{k=1..n} floor(n/k)^k.
3

%I #20 Aug 26 2022 15:19:00

%S 1,3,5,10,12,26,28,52,73,115,117,295,297,439,713,1160,1162,2448,2450,

%T 4644,6832,8902,8904,23536,25639,33857,53247,84961,84963,192237,

%U 192239,318477,493909,625015,695789,1761668,1761670,2285996,3872598,6255230,6255232,13392362

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

%H Seiichi Manyama, <a href="/A345176/b345176.txt">Table of n, a(n) for n = 1..5000</a>

%F G.f.: (1/(1 - x)) * Sum_{j>=1} Sum_{k>=1} (k*x^k)^j * (1 - x^j).

%F a(n) ~ 3^((n - mod(n,3))/3 + 1)/2. - _Vaclav Kotesovec_, Jun 11 2021

%t a[n_] := Sum[Floor[n/k]^k, {k, 1, n}]; Array[a, 40] (* _Amiram Eldar_, Jun 10 2021 *)

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

%o (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))

%Y Cf. A001923, A006218, A332469, A345098, A345100.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Jun 10 2021