Prime constant
{{Short description|Real number whose nth binary digit is 1 if n is prime and 0 if n is composite or 1}}
{{distinguish|Twin prime#First Hardy–Littlewood conjecture{{!}}Hardy–Littlewood's twin prime constant|Brun's theorem{{!}}Brun's twin prime constant}}
The prime constant is the real number whose th binary digit is 1 if is prime and 0 if is composite or 1.{{Cite web |last=Weisstein |first=Eric W. |title=Prime Constant |url=https://mathworld.wolfram.com/PrimeConstant.html |access-date=2025-01-31 |website=mathworld.wolfram.com |language=en}}
In other words, is the number whose binary expansion corresponds to the indicator function of the set of prime numbers. That is,
:
where indicates a prime and is the characteristic function of the set of prime numbers.
The beginning of the decimal expansion of ρ is: {{OEIS|A051006}}
The beginning of the binary expansion is: {{OEIS|A010051}}
Irrationality
The number is irrational.{{Cite book|last=Hardy|first=G. H.|url=https://www.worldcat.org/oclc/214305907|title=An introduction to the theory of numbers|date=2008|publisher=Oxford University Press|others=E. M. Wright, D. R. Heath-Brown, Joseph H. Silverman|isbn=978-0-19-921985-8|edition=6th|location=Oxford|oclc=214305907}}
= Proof by contradiction =
Suppose were rational.
Denote the th digit of the binary expansion of by . Then since is assumed rational, its binary expansion is eventually periodic, and so there exist positive integers and such that
for all and all .
Since there are an infinite number of primes, we may choose a prime . By definition we see that . As noted, we have for all . Now consider the case . We have , since is composite because . Since we see that is irrational.