OFFSET
1,3
FORMULA
G.f. A(x) satisfies: A(x) = x * ( 1 - A(x) + A(x^2) - A(x^3) + A(x^4) - A(x^5) + ... ).
G.f.: x * ( 1 - Sum_{n>=1} a(n) * x^n / (1 + x^n) ).
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
add((-1)^((n-1)/d)*a(d), d=numtheory[divisors](n-1)))
end:
seq(a(n), n=1..54); # Alois P. Heinz, Feb 10 2022
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Sum[(-1)^((n - 1)/d) a[d], {d, Divisors[n - 1]}]; Table[a[n], {n, 1, 54}]
nmax = 54; A[_] = 0; Do[A[x_] = x (1 + Sum[(-1)^k A[x^k], {k, 1, nmax}]) + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x] // Rest
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Feb 10 2022
STATUS
approved