Problem

Source: ISL 2022 N6

Tags: number theory, prime factorization, function, prime numbers, primes



Let $Q$ be a set of prime numbers, not necessarily finite. For a positive integer $n$ consider its prime factorization: define $p(n)$ to be the sum of all the exponents and $q(n)$ to be the sum of the exponents corresponding only to primes in $Q$. A positive integer $n$ is called special if $p(n)+p(n+1)$ and $q(n)+q(n+1)$ are both even integers. Prove that there is a constant $c>0$ independent of the set $Q$ such that for any positive integer $N>100$, the number of special integers in $[1,N]$ is at least $cN$. (For example, if $Q=\{3,7\}$, then $p(42)=3$, $q(42)=2$, $p(63)=3$, $q(63)=3$, $p(2022)=3$, $q(2022)=1$.)