OFFSET
0,4
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
MATHEMATICA
a[0] = 1; a[1] = 1; a[2] = 1;
a[n_] := a[n] = a[n - 1] + a[n - 2] + Sum[k*a[Floor[n/k]], {k, 2, n}];
Table[a[n], {n, 0, 30}] (* A298369 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A298369(n):
if n <= 2:
return 1
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2*(j2-1)-j*(j-1))*A298369(k1)//2
j, k1 = j2, n//j2
return c+(n*(n+1)-j*(j-1))//2 # Chai Wah Wu, Mar 31 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 10 2018
STATUS
approved