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 #11 Dec 14 2021 12:10:11
%S 1,0,-1,1,-1,1,0,1,-2,0,0,1,0,1,-1,-1,-3,1,3,1,1,0,-1,1,-2,0,-1,-2,-1,
%T 1,3,1,-2,0,2,0,2,1,-4,0,-1,1,1,1,0,-4,0,1,-6,1,2,-3,0,1,5,0,0,3,0,1,
%U 3,1,-4,-1,-3,0,3,1,3,-1,-1,1,0,1,-3,-4,-4,1,5,1,-4
%N a(0) = 1; a(n) = Sum_{d|n, d < n} (-1)^(n/d + 1) * a(d - 1).
%H Antti Karttunen, <a href="/A348956/b348956.txt">Table of n, a(n) for n = 0..20000</a>
%H Ilya Gutkovskiy, <a href="/A348956/a348956.jpg">Scatterplot of partial sums of A348956</a>
%F G.f. A(x) satisfies: A(x) = 1 - x^2 * A(x^2) + x^3 * A(x^3) - x^4 * A(x^4) + ...
%t a[0] = 1; a[n_] := a[n] = Sum[If[d < n, (-1)^(n/d + 1) a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 80}]
%t nmax = 80; A[_] = 0; Do[A[x_] = 1 - Sum[(-x)^k A[x^k], {k, 2, nmax}] + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x]
%o (PARI) A348956(n) = if(!n,1,sumdiv(n,d,if(d<n,A348956(d-1)*(-1)^(1 + (n/d)),0))); \\ _Antti Karttunen_, Nov 05 2021
%Y Cf. A067856, A167865, A307776, A308077, A335062, A338639, A343371.
%K sign,look
%O 0,9
%A _Ilya Gutkovskiy_, Nov 04 2021