OFFSET
0,33
FORMULA
G.f. A(x) satisfies: A(x) = 1 / (1 - x) - x^2 * A(x^2) - x^3 * A(x^3) - x^4 * A(x^4) - ...
MATHEMATICA
a[n_] := a[n] = 1 - Sum[If[d < n, a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 90}]
nmax = 90; A[_] = 0; Do[A[x_] = 1/(1 - x) - Sum[x^k A[x^k], {k, 2, nmax}] + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x]
PROG
(Python)
from functools import lru_cache
from sympy import divisors
@lru_cache(maxsize=None)
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 17 2021
STATUS
approved