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”).

a(n) = Sum_{d|n} (-1)^pi(d).
2

%I #10 Sep 13 2024 15:57:32

%S 1,0,2,1,0,0,2,2,3,0,0,0,2,2,2,3,0,0,2,2,4,0,0,0,-1,0,2,2,2,2,0,2,0,

%T -2,0,-1,2,2,4,4,0,2,2,2,4,0,0,0,1,-2,0,0,2,0,0,4,4,2,0,2,2,0,6,3,2,0,

%U 0,-2,0,0,2,0,0,0,0,2,0,0,2,6,3,0,0,0,-2,0,2,2

%N a(n) = Sum_{d|n} (-1)^pi(d).

%C Inverse Möbius transform of (-1)^pi(n) (A065357).

%H Robert Israel, <a href="/A373923/b373923.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local d; add((-1)^numtheory:-pi(d),d=numtheory:-divisors(n)) end proc:

%p map(f, [$1..100]); # _Robert Israel_, Sep 13 2024

%t Table[DivisorSum[n, (-1)^PrimePi[#] &], {n, 100}]

%Y Cf. A000720 (pi), A065357, A065358 (Jacob's Ladder sequence).

%K sign

%O 1,3

%A _Wesley Ivan Hurt_, Jun 22 2024