login
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