The Polya conjecture is a disproved conjecture that states over half the numbers less than any number has an odd number of prime factors. It first fails at $n = 906,150,257$, thus being a good example that testing very many cases is not always enough.
I have been giving "disproving the Polya conjecture" as an exercise a few times, as the counter example is well within computational capabilities.
The simple algorithm for it is to have an incrementing $n$, factorize it, count the factors, and increment either the counter for odd numbers, or even numbers. Continue until you reach the counter example.
Factorization is however an operation to try to avoid, as even the most effective algorithms for that have a nasty computational complexity.
The amount of unnecessary information created by factorizing every number got me wondering if there are better ways. Because:
- We do not have to know what the factors of a number are, just how many.
- Even the number of prime factors is not needed, as we only need the parity.
- We do not have to know the parity of the number of prime factors of each number in a range, it is sufficient to know how many are odd, and how many are even.
Factorization here yields a lot more information than actually needed. Is it really necessary?