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”).
%I #8 Apr 17 2021 19:36:57
%S 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,
%T 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,
%U -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
%N a(n) = 1 - Sum_{d|n, d < n} a(d - 1).
%F 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) - ...
%t a[n_] := a[n] = 1 - Sum[If[d < n, a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 90}]
%t 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]
%o (Python)
%o from functools import lru_cache
%o from sympy import divisors
%o @lru_cache(maxsize=None)
%o def A343493(n): return 1-sum(A343493(d-1) for d in divisors(n) if d < n) # _Chai Wah Wu_, Apr 17 2021
%Y Cf. A167865, A281487, A338639, A343371.
%K sign
%O 0,33
%A _Ilya Gutkovskiy_, Apr 17 2021