OFFSET
0,4
FORMULA
G.f. A(x) satisfies: A(x) = (1 - x - x^2 - x^3) * A(x^3).
G.f.: Product_{k>=0} (1 - x^(3^k) - x^(2*3^k) - x^(3^(k+1))).
MATHEMATICA
a[0] = 1; a[n_] := Switch[Mod[n, 3], 0, a[n/3] - a[(n - 3)/3], 1, -a[(n - 1)/3], 2, -a[(n - 2)/3]]; Table[a[n], {n, 0, 95}]
nmax = 95; A[_] = 1; Do[A[x_] = (1 - x - x^2 - x^3) A[x^3] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
nmax = 95; CoefficientList[Series[Product[(1 - x^(3^k) - x^(2 3^k) - x^(3^(k + 1))), {k, 0, Floor[Log[3, nmax]] + 1}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Jun 05 2021
STATUS
approved