Prime-indicator reals in integer bases

edit · history · discussion · files · short url · radix expansion number theory
Numbers
$b$ 
$\rho_b$
2:
0.4146825098511116602481096221543077083657742381379169778682454144886409606193573341962900484284757779
3:
0.1527269027257224715281754187442591243034236427146329850862883753673213222309211062703709595589873975
4:
0.07916285103785014967177111796220818461303856975187808417909991523120963266138171158278067036022206675
5:
0.04833282130056323269166347125156659652270234103401582722949677468392791669750960651527238663866160107
6:
0.03253958330852554404926005078127418119298607661757809888766461009907677383130391516338809348063541229
7:
0.02338432896035373990985982249591237348934093593594486961998288465652356827546805121213621863107627929
8:
0.01760911953351796538527849735663134262381818010794969940648012684128754941232144472575773624632196010
9:
0.01373456532005491924314717540862545165044687702308365662972525570153191133850081093222891370739793417
10:
0.01101010001010001010001000001010000010001010001000001000001010000010001010000010001000001000000010001
11:
0.009022038143395255182988971062555767699239004682387818322942759728920677504644741240613383183223714175
12:
0.007527194833388262821719072766020381510401886368642782057217448053536401571306359103825639572242442164
13:
0.006375035126889452433949141587963434634159911294916517006505457254019711635012517727841579981607423424
14:
0.005468341134226632237506232020056881951019925995050329642825848128391995720432337820530771708052545127
15:
0.004742063466051194906084682092993029259222574602169892732207567360586043840666526667182904360699798676
16:
0.004151348024663770178781162426944228287472052147012141820206441790817145039583512009304794663363663743
Definition
For an integer base $b\geq2$, define the prime-indicator real $\rho_b=\sum_{p\text{ prime}} b^{-p}$, where the primes begin at $2$. The binary member is the prime constant [1].
Parameters
$b$
—   construction base ($b\geq2$)
Formulas
(1)
Let $\pi(n)$ be the number of primes at most the integer $n$. Then $\displaystyle \rho_b=(1-b^{-1})\sum_{n=1}^{\infty}\pi(n)b^{-n}$. Each prime $p$ contributes to every $\pi(n)$ with $n\geq p$; summing the resulting geometric series gives this identity. Its binary case is recorded in [1].
(2)
For an integer $M\geq1$, put $S_M=\sum_{p\leq M,\ p\text{ prime}}b^{-p}$. Then $\displaystyle 0<\rho_b-S_M\leq\frac{b^{-M}}{b-1}$, by including all integer positions beyond $M$ in a geometric majorant.
(3)
For an integer $N\geq1$, put $A_N=(1-b^{-1})\sum_{n=1}^{N}\pi(n)b^{-n}$. Since $\pi(n)\leq n$, the omitted tail satisfies $\displaystyle 0<\rho_b-A_N\leq b^{-(N+1)}\left(N+1+\frac{1}{b-1}\right)$.
Comments
(4)
The digit at fractional position $n\geq1$ in base $b$ is $1$ if $n$ is prime and $0$ otherwise. Position $1$ is the first digit after the radix point and has digit $0$. The first $23$ digits are $0.01101010001010001010001\ldots{}_b$, with the same position rule in each base.
(5)
The prime constant is $\rho_2=0.414682509851111660\ldots$ in decimal notation [1]. All stored values are decimal enclosures. Changing the construction base $b$ changes the real number, rather than merely its notation.
Programs
(P1)
Sage
import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.rings.real_mpfi import RealIntervalField
from sage.arith.misc import prime_range

def prime_indicator(b, digits=100):
    b = ZZ(b)
    if b < 2:
        raise ValueError('b must be an integer >= 2')
    M = 1
    while (b-1)*b**M <= 10**(digits+20):
        M += 1
    S = sum((QQ(1)/b**p for p in prime_range(M+1)), QQ(0))
    F = RealIntervalField(max(512, numberdb.bits(digits+40)))
    return F(S, S+QQ(1)/((b-1)*b**M))

# The initial finite selection; prime_indicator(b) also accepts other b>=2.
for b in range(2, 17):
    print(b, prime_indicator(b))
Links
Similar tables
Values of the prime zeta function at rational numbers —   The prime zeta function weights each prime $p$ by $p^{-s}$; $\rho_b$ instead uses the prime as an exponent of a fixed radix.
Copeland–Erdős constants in integer bases —   These constants concatenate the base-$b$ expansions of successive primes. The prime-indicator real instead places a single digit $1$ at each prime position.
Liouville reals in integer bases —   Both constructions put digit $1$ at selected positions. The Liouville construction uses factorial positions; this table uses prime positions.
Data properties
Entries are of type: real number
Table is complete: no (it holds every integer construction radix $2\leq b\leq16$, giving a bounded reference selection of small radices alongside the binary prime constant; the upper bound $16$ is noncanonical, and larger integer bases are equally valid)
How they were obtained:

The generator sums exact rational terms for primes at most $M$, using a sieve. It selects $M$ by the exact inequality $(b-1)b^M>10^{d+20}$ for requested decimal precision $d$, and encloses the infinite sum between $S_M$ and $S_M+b^{-M}/(b-1)$. The two rational endpoints are converted outward with MPFI, using $512$ bits for the default $d=100$. No finite prefix is treated as the exact infinite value.

more

A separate implementation uses trial division, the prime-counting identity and its independently bounded tail. All fifteen serialized intervals contain those narrower exact brackets; their first $23$ radix digits agree with the prime-position rule. The binary member agrees with the first $150$ decimal source digits. Known prime-count and finite-identity controls and deliberately altered values, digit positions and source digits check the checker. The displayed Sage program is also checked on every selected radix. Source hashes, code, exact brackets and measured widths are attached. These computations support the stated enclosures and do not assert transcendence or normality.