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”).
%I #16 Apr 01 2023 11:23:52
%S 1,2,5,11,16,31,38,62,80,105,116,194,207,242,287,383,400,526,545,675,
%T 738,793,816,1200,1250,1315,1423,1605,1634,1979,2010,2394,2493,2578,
%U 2683,3475,3512,3607,3724,4364,4405,4888,4931,5217,5577,5692,5739,7563,7661,8011
%N a(1) = 1; a(n) = Sum_{k=2..n} k * a(floor(n/k)).
%H Seiichi Manyama, <a href="/A359399/b359399.txt">Table of n, a(n) for n = 1..10000</a>
%F G.f. A(x) satisfies A(x) = x + (1/(1 - x)) * Sum_{k>=2} k * (1 - x^k) * A(x^k).
%o (Python)
%o from functools import lru_cache
%o @lru_cache(maxsize=None)
%o def A359399(n):
%o if n <= 1:
%o return 1
%o c, j = 0, 2
%o k1 = n//j
%o while k1 > 1:
%o j2 = n//k1 + 1
%o c += (j2*(j2-1)-j*(j-1)>>1)*A359399(k1)
%o j, k1 = j2, n//j2
%o return c+(n*(n+1)-(j-1)*j>>1) # _Chai Wah Wu_, Mar 31 2023
%Y Cf. A022825.
%K nonn
%O 1,2
%A _Seiichi Manyama_, Mar 31 2023