login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298369 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) = 1, a(2) = 1. 2

%I #11 Mar 31 2021 19:00:29

%S 1,1,1,7,17,38,87,164,318,576,1040,1773,3134,5241,8877,14728,24579,

%T 40298,66585,108610,178004,289717,472312,766643,1247081,2021980,

%U 3281557,5316888,8619474,13957420,22611507,36603571,59270152,95931095,155290091,251310597

%N 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) = 1, a(2) = 1.

%C 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 Clark Kimberling, <a href="/A298369/b298369.txt">Table of n, a(n) for n = 0..1000</a>

%t a[0] = 1; a[1] = 1; a[2] = 1;

%t a[n_] := a[n] = a[n - 1] + a[n - 2] + Sum[k*a[Floor[n/k]], {k, 2, n}];

%t Table[a[n], {n, 0, 30}] (* A298369 *)

%o (Python)

%o from functools import lru_cache

%o @lru_cache(maxsize=None)

%o def A298369(n):

%o if n <= 2:

%o return 1

%o c, j = A298369(n-1)+A298369(n-2), 2

%o k1 = n//j

%o while k1 > 1:

%o j2 = n//k1 + 1

%o c += (j2*(j2-1)-j*(j-1))*A298369(k1)//2

%o j, k1 = j2, n//j2

%o return c+(n*(n+1)-j*(j-1))//2 # _Chai Wah Wu_, Mar 31 2021

%Y Cf. A001622, A000045, A298338.

%K nonn,easy

%O 0,4

%A _Clark Kimberling_, Feb 10 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 10:38 EDT 2024. Contains 371791 sequences. (Running on oeis4.)