The modular prime counting function counts the primes
with
,
where
and
are integers. It is analogous to the prime
counting function
(Shanks 1993, pp. 21-22).
Littlewood proved that and
change leads infinitely often (Granville and Martin
2004), a result known as the prime quadratic
effect. The bias toward positive values of
is known as the Chebyshev
bias.
For fixed , the counts
for residue classes
relatively prime to
are asymptotically equal: the ratio of any two tends to 1
as
(Granville and Martin 2004). This does not imply equality of their values at finite
.
The following table gives
for several small moduli and powers of ten (Shanks
1993).
| Sloane | A091115 | A091116 | A091098 | A091099 |
| 1 | 2 | 1 | 2 | |
| 11 | 13 | 11 | 13 | |
| 80 | 87 | 80 | 87 | |
| 611 | 617 | 609 | 619 | |
| 4784 | 4807 | 4783 | 4808 | |
| 39231 | 39266 | 39175 | 39322 | |
| 332194 | 332384 | 332180 | 332398 | |
| 2880517 | 2880937 | 2880504 | 2880950 | |
| 25422713 | 25424820 | 25423491 | 25424042 |
| Sloane | A091120 | A091121 | A091122 | A091123 | A091124 | A091125 |
| 0 | 1 | 1 | 0 | 1 | 0 | |
| 3 | 4 | 5 | 3 | 5 | 4 | |
| 28 | 27 | 30 | 26 | 29 | 27 | |
| 203 | 203 | 209 | 202 | 211 | 200 | |
| 1593 | 1584 | 1613 | 1601 | 1604 | 1596 | |
| 13063 | 13065 | 13105 | 13069 | 13105 | 13090 | |
| 110653 | 110771 | 110815 | 110776 | 110787 | 110776 | |
| 960023 | 960114 | 960213 | 960085 | 960379 | 960640 | |
| 8474221 | 8474796 | 8475123 | 8474021 | 8474630 | 8474742 |
| Sloane | A091126 | A091127 | A091128 | A091129 |
| 0 | 1 | 1 | 1 | |
| 5 | 7 | 6 | 6 | |
| 37 | 44 | 43 | 43 | |
| 295 | 311 | 314 | 308 | |
| 2384 | 2409 | 2399 | 2399 | |
| 19552 | 19653 | 19623 | 19669 | |
| 165976 | 166161 | 166204 | 166237 | |
| 1439970 | 1440544 | 1440534 | 1440406 | |
| 12711220 | 12712340 | 12712271 | 12711702 |
Partitioning the residue classes modulo 4 into those modulo 8 gives the exact identities
|
(1)
| |||
|
(2)
|
Erdős proved that there exists at least one prime of the form and at least one prime
of the form
between
and
for all
.