login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343493
a(n) = 1 - Sum_{d|n, d < n} a(d - 1).
1
1, 1, 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, -1, 1, 0, 1, 0, 0, 0, 0, -2, 0, 0, 2, 0, 0, -1, 1, 0, 0, 0, 0, -2, 2, 0, 0, -2, 1, 1, 1, -1, 0, 0, 1, -1, 0, -1, 0, 0, 0, -1, 2, -2, 2, 0, 0, 0, 1, 1, 0, -2, 0, -1, 2, -1, 1, 0, 0, -2, 1, -1, 0, -1, 2, -1, 0, -2, 0, 3
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)
def A343493(n): return 1-sum(A343493(d-1) for d in divisors(n) if d < n) # Chai Wah Wu, Apr 17 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 17 2021
STATUS
approved