This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A347992 #48 Oct 14 2021 08:48:53 %S A347992 1,0,0,1,0,-2,0,0,1,-2,0,-2,0,-2,-2,1,0,-2,0,-2,-2,-2,0,-4,1,-2,0,-2, %T A347992 0,-6,0,0,-2,-2,-2,-1,0,-2,-2,-4,0,-6,0,-2,-2,-2,0,-4,1,-2,-2,-2,0,-4, %U A347992 -2,-4,-2,-2,0,-8,0,-2,-2,1,-2,-6,0,-2,-2,-6,0,-4,0,-2,-2,-2,-2,-6,0,-4,1,-2,0,-8,-2,-2,-2 %N A347992 a(n) = Sum_{d|n} (-1)^(tau(d) - 1). %H A347992 Seiichi Manyama, <a href="/A347992/b347992.txt">Table of n, a(n) for n = 1..10000</a> %F A347992 If p is prime, a(p) = 0. %F A347992 If p is prime, a(p^even) = 1 and a(p^odd) = 0. - _Michel Marcus_, Oct 13 2021 %F A347992 If p <> q primes, a(p*q) = -2 (A006881). - _Bernard Schott_, Oct 13 2021 %F A347992 G.f.: Sum_{k>=1} (-1)^(tau(k) - 1) * x^k/(1 - x^k). - _Seiichi Manyama_, Oct 14 2021 %t A347992 a[n_] := DivisorSum[n, (-1)^(DivisorSigma[0, #] - 1) &]; Array[a, 100] (* _Amiram Eldar_, Oct 08 2021 *) %o A347992 (PARI) a(n) = sumdiv(n, d, (-1)^(numdiv(d)-1)); %o A347992 (PARI) my(N=99, x='x+O('x^N)); Vec(sum(k=1, N, (-1)^(numdiv(k)-1)*x^k/(1-x^k))) %Y A347992 Cf. A000005 (tau), A001248, A006881, A347405, A348223. %K A347992 sign %O A347992 1,6 %A A347992 _Seiichi Manyama_, Oct 08 2021