OFFSET
1,3
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
G.f. A(x) satisfies: A(x) = x + (1/(1 - x)) * Sum_{k>=2} (1 - x^k) * A(x^k). - Ilya Gutkovskiy, Feb 21 2022
MAPLE
a:= proc(n) option remember; `if`(n<2, 1,
add(a(iquo(n, j)), j=2..n))
end:
seq(a(n), n=1..63); # Alois P. Heinz, Mar 31 2021
MATHEMATICA
Fold[Append[#1, Total[#1[[Quotient[#2, Range[2, #2]]]]]] &, {1}, Range[2, 60]] (* Ivan Neretin, Aug 24 2016 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A022825(n):
if n <= 1:
return n
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*A022825(k1)
j, k1 = j2, n//j2
return c+n+1-j # Chai Wah Wu, Mar 31 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset corrected by Alois P. Heinz, Mar 31 2021
STATUS
approved