This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A298370 #10 Mar 31 2021 19:10:16 %S A298370 1,2,3,15,38,83,190,356,695,1254,2267,3861,6829,11417,19340,32076, %T A298370 53545,87784,145048,236589,387765,631106,1028866,1670013,2716595, %U A298370 4404599,7148426,11582096,18776334,30404300,49256015,79735758,129111774,208972513,338277831 %N A298370 a(n) = a(n-1) + a(n-2) + 2 a(floor(n/2)) + 3 a(floor(n/3)) + ... + n a(floor(n/n)), where a(0) = 1, a(1) = 2, a(2) = 3. %C A298370 a(n)/a(n-1) -> (1 + sqrt(5))/2, the golden ratio (A001622), so that (a(n)) has the growth rate of the Fibonacci numbers (A000045). See A298338 for a guide to related sequences. %H A298370 Clark Kimberling, <a href="/A298370/b298370.txt">Table of n, a(n) for n = 0..1000</a> %t A298370 a[0] = 1; a[1] = 2; a[2] = 3; %t A298370 a[n_] := a[n] = a[n - 1] + a[n - 2] + Sum[k*a[Floor[n/k]], {k, 2, n}]; %t A298370 Table[a[n], {n, 0, 30}] (* A298370 *) %o A298370 (Python) %o A298370 from functools import lru_cache %o A298370 @lru_cache(maxsize=None) %o A298370 def A298370(n): %o A298370 if n <= 2: %o A298370 return n+1 %o A298370 c, j = A298370(n-1)+A298370(n-2), 2 %o A298370 k1 = n//j %o A298370 while k1 > 1: %o A298370 j2 = n//k1 + 1 %o A298370 c += (j2*(j2-1)-j*(j-1))*A298370(k1)//2 %o A298370 j, k1 = j2, n//j2 %o A298370 return c+2*(n*(n+1)-j*(j-1))//2 # _Chai Wah Wu_, Mar 31 2021 %Y A298370 Cf. A001622, A000045, A298338. %K A298370 nonn,easy %O A298370 0,2 %A A298370 _Clark Kimberling_, Feb 10 2018