cp's OEIS Frontend

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.

A298409 a(n) = 2*a(n-1) - a(n-3) + 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.

This page as a plain text file.
%I A298409 #10 Mar 31 2021 19:18:26
%S A298409 1,2,3,15,48,123,300,635,1316,2555,4873,8850,16096,28296,49424,84749,
%T A298409 144733,243607,409156,680308,1128889,1861633,3063978,5020133,8217296,
%U A298409 13409702,21862824,35575784,57853195,93954953,152524643,247386674,401132014,650065133
%N A298409 a(n) = 2*a(n-1) - a(n-3) + 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 A298409 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 A298409 Clark Kimberling, <a href="/A298409/b298409.txt">Table of n, a(n) for n = 0..1000</a>
%t A298409 a[0] = 1; a[1] = 2; a[2] = 3;
%t A298409 a[n_] := a[n] = 2*a[n - 1] - a[n - 3] + Sum[k*a[Floor[n/k]], {k, 2, n}];
%t A298409 Table[a[n], {n, 0, 90}]  (* A298409  *)
%o A298409 (Python)
%o A298409 from functools import lru_cache
%o A298409 @lru_cache(maxsize=None)
%o A298409 def A298409(n):
%o A298409     if n <= 2:
%o A298409         return n+1
%o A298409     c, j = 2*A298409(n-1)-A298409(n-3), 2
%o A298409     k1 = n//j
%o A298409     while k1 > 1:
%o A298409         j2 = n//k1 + 1
%o A298409         c += (j2*(j2-1)-j*(j-1))*A298409(k1)//2
%o A298409         j, k1 = j2, n//j2
%o A298409     return c+2*(n*(n+1)-j*(j-1))//2 # _Chai Wah Wu_, Mar 31 2021
%Y A298409 Cf. A001622, A000045, A298338, A298408.
%K A298409 nonn,easy
%O A298409 0,2
%A A298409 _Clark Kimberling_, Feb 10 2018