The following function came up in my work: $$ f(x)=\sum_{p\text{ prime}}\frac{1}{x^p}=\frac{1}{x^2}+\frac{1}{x^3}+\frac{1}{x^5}+\frac{1}{x^7}+\frac{1}{x^{11}}+\cdots. $$

Naturally, this converges for $x>1$ since the geometric series does. Does this function have a name? Is there a better way to calculate it than the straightforward sum? In my application I can bound $x$ away from 1 if it helps.

  • 4
    $\begingroup$ It is related with an exponential sum over primes (see Vinogradov) through the substitution $x=e^{\pm u}$ or $x=e^{\pm iu}$. $\endgroup$ Jul 1, 2016 at 15:10
  • 2
    $\begingroup$ @JackD'Aurizio: Yes -- but crucially in my case, there is no cancellation and the magnitudes are not 1. $\endgroup$
    – Charles
    Jul 1, 2016 at 16:53
  • 6
    $\begingroup$ Naturally, I'm curious, where did this function come up in your work? I can't guess any application for it. Especially if you know no other form (i.e. an integral) $\endgroup$
    – Yuriy S
    Aug 17, 2016 at 12:58
  • 1
    $\begingroup$ Has anyone calculated f(2) and compare it to common constants? $\endgroup$ Jan 13, 2017 at 13:01
  • 3
    $\begingroup$ @ypercubeᵀᴹ It's oeis.org/A051006 for what it's worth. $\endgroup$
    – Charles
    Jan 13, 2017 at 16:56

1 Answer 1


The values of your function $f$ at positive integers $n$ correspond to the base-$n$ representations of the prime constant.

Indeed, $f$ is closely related to the characteristic function of the prime numbers. For instance, $f(2)$ evaluates to the prime constant $\rho$, defined as:

$$ \rho =\sum _{{p}}{\frac {1}{2^{p}}}=\sum _{{n=1}}^{\infty }{\frac {\chi _{{{\mathbb {P}}}}(n)}{2^{n}}}, $$

where $\chi_\mathbb{P}$ is the characteristic function of the primes, i.e., the function such that for positive integer $n$:

$$ {\displaystyle \chi_\mathbb{P}(n):={\begin{cases}1&{\text{if }}x\in \mathbb{P},\\0&{\text{if }}x\notin \mathbb{P},\end{cases}}} $$

where $\mathbb{P}$ denotes the set of prime numbers.

The decimal expansion of $\rho$ begins with: \begin{align} \rho&=0.414682509851111660248109622\ldots \\ &=0.011010100010100010_2. \end{align}

and is included in the OEIS as sequence A051006.

The values of $f$ for other integers $n$ correspond simply to the base-$n$ representations of the prime constant. If we denote by $\rho_n$ the base-$n$ representation of $\rho$, we have:

\begin{align} f(3)=\sum _{{p}}{\frac {1}{3^{p}}}&=\rho_3 \\ &=0.011010100010100010_3 \\ &=0.152726266\ldots... \end{align}

Therefore $f(n)=\rho_n$ for positive integers $n$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.