Do all the zeroes of this arithmetic function occur at even integers?

83 Views Asked by At

Let $a(n)$ be the number of natural numbers $\le n$ which have an odd number of distinct prime factors. Let $b(n)$ be the number of natural numbers $\le n$ which have an even number of distinct prime factors.

Conjecture: If $a(n) = b(n)$ then $n$ is even.

I have verified this conjecture for each of $8883$ zeroes of $s(n) = a(n)-b(n)$ for $n \le 1.25 \times 10^8$. Is this true in general?

Sage code

n = 1
s = f = 0
target = set = 10^6
while True:
    s = s + (-1)^(len(prime_divisors(n)))
    if s == 0:
        f = f + 1
        if n%2 == 1:
            print "Odd zero", n
            break
    if n > target:
        print n,f
        target = target + set
    n = n + 1
1

There are 1 best solutions below

0
On BEST ANSWER

Since $a(n)+b(n)=n$ the claim is clear.