The prime constant is the real number                     ρ                 whose                     n                th binary digit is 1 if                     n                 is prime and 0 if n is composite or 1.
In other words,                     ρ                 is simply the number whose binary expansion corresponds to the indicator function of the set of prime numbers. That is,
                    ρ        =                  ∑                      p                                                1                          2                              p                                                    =                  ∑                      n            =            1                                ∞                                                                              χ                                                      P                                                              (              n              )                                      2                              n                                                            where                     p                 indicates a prime and                               χ                                    P                                               is the characteristic function of the primes.
The beginning of the decimal expansion of ρ is:                     ρ        =        0.414682509851111660248109622        …                 (sequence A051006 in the OEIS)
The beginning of the binary expansion is:                     ρ        =        0.011010100010100010100010000                  …                      2                                   (sequence A010051 in the OEIS)
A close approximation can be obtained using the golden ratio and the polygon circumscribing constant:
                    φ                              5                                    /                κ                The prime constant has been used in the calculation of value of the inverse fine-structure constant, together with traditional Pythagorean triangles:
                              α                      −            1                          ≈        157        −        337        ρ                  /                7                The number                     ρ                 is easily shown to be irrational. To see why, suppose it were rational.
Denote the                     k                th digit of the binary expansion of                     ρ                 by                               r                      k                                  . Then, since                     ρ                 is assumed rational, there must exist                     N                ,                     k                 positive integers such that                               r                      n                          =                  r                      n            +            i            k                                   for all                     n        >        N                 and all                     i        ∈                  N                        .
Since there are an infinite number of primes, we may choose a prime                     p        >        N                . By definition we see that                               r                      p                          =        1                . As noted, we have                               r                      p                          =                  r                      p            +            i            k                                   for all                     i        ∈                  N                        . Now consider the case                     i        =        p                . We have                               r                      p            +            i            ⋅            k                          =                  r                      p            +            p            ⋅            k                          =                  r                      p            (            k            +            1            )                          =        0                , since                     p        (        k        +        1        )                 is composite because                     k        +        1        ≥        2                . Since                               r                      p                          ≠                  r                      p            (            k            +            1            )                                   we see that                     ρ                 is irrational.