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!)
A298407 a(n) = 2*a(n-1) - a(n-3) + a(floor(n/2)) + a(floor(n/3)) + ... + a(floor(n/n)), where a(0) = 1, a(1) = 2, a(2) = 3. 3
1, 2, 3, 9, 23, 52, 113, 223, 431, 794, 1442, 2532, 4433, 7589, 12924, 21730, 36411, 60440, 100125, 164816, 270863, 443390, 724846, 1181713, 1925113, 3130488, 5087530, 8258585, 13400782, 21728136, 35221342, 57065559, 92441545, 149701409, 242400952, 392424193 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
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.
LINKS
MATHEMATICA
a[0] = 1; a[1] = 2; a[2] = 3;
a[n_] := a[n] = 2*a[n - 1] - a[n - 3] + Sum[a[Floor[n/k]], {k, 2, n}];
Table[a[n], {n, 0, 90}] (* A298407 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A298407(n):
if n <= 2:
return n+1
c, j = 2*A298407(n-1)-A298407(n-3), 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*A298407(k1)
j, k1 = j2, n//j2
return c+2*(n-j+1) # Chai Wah Wu, Mar 31 2021
CROSSREFS
Sequence in context: A151825 A294910 A111240 * A227252 A274495 A299705
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 10 2018
STATUS
approved

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)