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 #9 Oct 06 2023 04:55:59
%S 0,0,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,0,1,0,2,0,0,1,0,1,0,1,1,1,0,0,1,0,
%T 1,0,1,1,2,0,0,2,1,0,0,0,0,1,0,0,1,1,1,0,0,1,2,1,0,1,1,0,1,0,1,1,0,0,
%U 1,1,1,0,0,1,1,1,1,2,1,0,0,0,0,2,0,1,2,0,1,0,2,0,1
%N Number of unitary prime divisors of n whose prime index is even.
%H Amiram Eldar, <a href="/A345375/b345375.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{p|n, p prime} ((pi(p)+1) mod 2) * floor(1/gcd(p,n/p)).
%F From _Amiram Eldar_, Oct 06 2023: (Start)
%F a(n) = A056169(n) - A345374(n).
%F a(n) <= A324967(n), with equality if and only if n is squarefree (A005117).
%F Additive with a(p^e) = 1 if e = 1 and primepi(p) is even and 0 otherwise. (End)
%t f[p_, e_] := If[e == 1 && EvenQ[PrimePi[p]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Oct 06 2023 *)
%o (PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i,2] == 1 && !(primepi(f[i,1])%2), 1, 0));} \\ _Amiram Eldar_, Oct 06 2023
%Y Cf. A000720, A005117, A056169, A324967, A345374.
%K nonn,easy
%O 1,21
%A _Wesley Ivan Hurt_, Jun 16 2021