# Parity problem (sieve theory)

In number theory, the parity problem refers to a limitation in sieve theory that prevents sieves from giving good estimates in many kinds of prime-counting problems. The problem was identified and named by Atle Selberg in 1949. Beginning around 1996, John Friedlander and Henryk Iwaniec developed some parity-sensitive sieves that make the parity problem less of an obstacle.

## Statement

Terence Tao gave this "rough" statement of the problem:
   Parity problem. If A is a set whose elements are all products of an odd number of primes (or are all products of an even number of primes), then (without injecting additional ingredients), sieve theory is unable to provide non-trivial lower bounds on the size of A. Also, any upper bounds must be off from the truth by a factor of 2 or more.
This problem is significant because it may explain why it is difficult for sieves to "detect primes," in other words to give a non-trivial lower bound for the number of primes with some property. For example, in a sense Chen's theorem is very close to a solution of the twin prime conjecture, since it says that there are infinitely many primes p such that p + 2 is either prime or the product of two primes (semiprime). The parity problem suggests that, because the case of interest has an odd number of prime factors (namely 1), it won't be possible to separate out the two cases using sieves.

## Example

This example is due to Selberg and is given as an exercise with hints by Cojocaru & Murty.$^{:133–134}$
The problem is to estimate separately the number of numbers ≤ x with no prime divisors ≤ x$^{1/2}$, that have an even (or an odd) number of prime factors. It can be shown that, no matter what the choice of weights in a Brun- or Selberg-type sieve, the upper bound obtained will be at least (2 + o(1)) x / ln x for both problems. But in fact the set with an even number of factors is empty and so has size 0. The set with an odd number of factors is just the primes between x$^{1/2}$ and x, so by the prime number theorem its size is (1 + o(1)) x / ln x. Thus these sieve methods are unable to give a useful upper bound for the first set, and overestimate the upper bound on the second set by a factor of 2.

## Parity-sensitive sieves

Beginning around 1996 John Friedlander and Henryk Iwaniec developed some new sieve techniques to "break" the parity problem. One of the triumphs of these new methods is the Friedlander–Iwaniec theorem, which states that there are infinitely many primes of the form a$^2$ + b$^4$.
Glyn Harman relates the parity problem to the distinction between Type I and Type II information in a sieve.

## Karatsuba phenomenon

In 2007 Anatolii Alexeevitch Karatsuba discovered an imbalance between the numbers in an arithmetic progression with given parities of the number of prime factors. His papers were published after his death.
Let $\mathbb {N}$ be a set of natural numbers (positive integers) that is, the numbers $1,2,3,\dots$. The set of primes, that is, such integers $n\in \mathbb {N}$, $n>1$, that have just two distinct divisors (namely, $n$ and $1$), is denoted by $\mathbb {P}$, $\mathbb {P} =\{2,3,5,7,11,\dots \}\subset \mathbb {N}$. Every natural number $n\in \mathbb {N}$, $n>1$, can be represented as a product of primes (not necessarily distinct), that is $n=p_{1}p_{2}\dots p_{k},$ where $p_{1}\in \mathbb {P} ,\ p_{2}\in \mathbb {P} ,\ \dots ,\ p_{k}\in \mathbb {P}$, and such representation is unique up to the order of factors.
If we form two sets, the first consisting of positive integers having even number of prime factors, the second consisting of positive integers having an odd number of prime factors, in their canonical representation, then the two sets are approximately the same size.
If, however, we limit our two sets to those positive integers whose canonical representation contains no primes in arithmetic progression, for example $6m+1$, $m=1,2,\dots$ or the progression $km+l$, $1\leq l<k$, $(l,k)=1$, $m=0,1,2,\dots$, then of these positive integers, those with an even number of prime factors will tend to be fewer than those with odd number of prime factors. Karatsuba discovered this property. He found also a formula for this phenomenon, a formula for the difference in cardinalities of sets of natural numbers with odd and even amount of prime factors, when these factors are complied with certain restrictions. In all cases, since the sets involved are infinite, by "larger" and "smaller" we mean the limit of the ratio of the sets as an upper bound on the primes goes to infinity. In the case of primes containing an arithmetic progression, Karatsuba proved that this limit is infinite.
We restate the Karatsuba phenomenon using mathematical terminology.
Let $\mathbb {N} _{0}$ and $\mathbb {N} _{1}$ be subsets of $\mathbb {N}$, such that $n\in \mathbb {N} _{0}$, if $n$ contains an even number of prime factors, and $n\in \mathbb {N} _{1}$, if $n$ contains an odd number of prime factors. Intuitively, the sizes of the two sets $\mathbb {N} _{0}$ and $\mathbb {N} _{1}$ are approximately the same. More precisely, for all $x\geq 1$, we define $n_{0}(x)$ and $n_{1}(x)$, where $n_{0}(x)$ is the cardinality of the set of all numbers $n$ from $\mathbb {N} _{0}$ such that $n\leq x$, and $n_{1}(x)$ is the cardinality of the set of all numbers $n$ from $\mathbb {N} _{1}$ such that $n\leq x$. The asymptotic behavior of $n_{0}(x)$ and $n_{1}(x)$ was derived by E. Landau:
    $n_{0}(x)={\frac {1}{2}}x+O\left(xe^{-c{\sqrt {\ln x}}}\right),n_{1}(x)={\frac {1}{2}}x+O\left(xe^{-c{\sqrt {\ln x}}}\right);c>0.$
This shows that
    $n_{0}(x)\sim n_{1}(x)\sim {\frac {1}{2}}x,$
that is $n_{0}(x)$ and $n_{1}(x)$ are asymptotically equal.
Further,
    $n_{1}(x)-n_{0}(x)=O\left(xe^{-c{\sqrt {\ln x}}}\right),$
so that the difference between the cardinalities of the two sets is small.
On the other hand, if we let $k\geq 2$ be a natural number, and $l_{1},l_{2},\dots l_{r}$ be a sequence of natural numbers, $1\leq r<\varphi (k)$, such that $1\leq l_{j}<k$; $(l_{j},k)=1$; every $l_{j}$ are different modulo $k$; $j=1,2,\dots r.$ Let $\mathbb {A}$ be a set of primes belonging to the progressions $kn+l_{j}$; $j\leq r$. ($\mathbb {A}$ is the set of all primes not dividing $k$).
We denote as $\mathbb {N} ^{*}$ a set of natural numbers, which do not contain prime factors from $\mathbb {A}$, and as $\mathbb {N} _{0}^{*}$ a subset of numbers from $\mathbb {N} ^{*}$ with even number of prime factors, as $\mathbb {N} _{1}^{*}$ a subset of numbers from $\mathbb {N} ^{*}$ with odd number of prime factors. We define the functions
    $n^{*}(x)=\displaystyle \sum _{\begin{array}{c}n\leq x\\n\in \mathbb {N} ^{*}\end{array}}1;n_{0}^{*}(x)=\displaystyle \sum _{\begin{array}{c}n\leq x\\n\in \mathbb {N} _{0}^{*}\end{array}}1;n_{1}^{*}(x)=\displaystyle \sum _{\begin{array}{c}n\leq x\\n\in \mathbb {N} _{1}^{*}\end{array}}1.$
Karatsuba proved that for $x\to +\infty$, the asymptotic formula
    $n_{1}^{*}(x)-n_{0}^{*}(x)\sim Cn^{*}(x)(\ln x)^{2\left({\frac {r}{\varphi (k)}}-1\right)},$
is valid, where $C$ is a positive constant.
He also showed that it is possible to prove the analogous theorems for other sets of natural numbers, for example, for numbers which are representable in the form of the sum of two squares, and that sets of natural numbers, all factors of which do belong to $\mathbb {A}$, will display analogous asymptotic behavior.
The Karatsuba theorem was generalized for the case when $\mathbf {A}$ is a certain unlimited set of primes.
The Karatsuba phenomenon is illustrated by the following example. We consider the natural numbers whose canonical representation does not include primes belonging to the progression $6m+1$, $m=1,2,\dots$. Then this phenomenon is expressed by the formula:
    $n_{1}^{*}(x)-n_{0}^{*}(x)\sim {\frac {\pi }{8{\sqrt {3}}}}{\frac {n^{*}(x)}{\ln x}},\qquad x\to +\infty .$