# Prime reciprocals sum

Let $a_i$ be a sequence of 1's and 2's and $p_i$ the prime numbers.
And let $r=\displaystyle\sum_{i=1}^\infty p_i^{-a_i}$

Can r be rational, and can r be any rational > 1/2 or any real ?

ver.2:
Let k be a positive real number and let $a_i$ be 1 + (the i'th digit in the binary decimal expansion of k).

And let $r(k)=\displaystyle\sum_{n=1}^\infty n^{-a_n}$

Does $r(k)=x$ have a solution for every $x>\pi^2/6$, and how many ?

-
I have to wonder where these sums you have are coming from... – J. M. Nov 6 '11 at 1:00
Eh, my answer was correct I believe (yes, any real in $[P(2),\infty)$) but the algorithm I gave was invalid. One algorithm would be to choose the $a_i$ one at a time depending on which stays under the desired $r$, and if ever both options are unavailable we simply go back and edit our last choice of $1$ to a $2$ and continue. I'm too tired right now to ... well, frankly, to figure out why I think this works. – anon Nov 6 '11 at 1:23
I would suggest a much more general question (there's really no reason to specialize to primes and restricted exponents). Let $a_i\le b_i$ for all $i=1,2,3,\dots$ Suppose $\sum a_i=A$ converges but $\sum b_i\to\infty$ diverges. Then the question would be how we prove that any number in $[A,\infty)$ can be represented by $\sum c_i$, where $c_i\in\{a_i,b_i\}$ for each $i$. – anon Nov 6 '11 at 1:27
The only problem is that whenever you pick a $1$ instead of a $2$ you need to make sure that the tail of the sum with every prime given the power $-2$ still stays under the bound and you can't be too conservative with choosing $1$'s or you might never reach the limit. If this is easy to resolve, then the problem is simple. – pki Nov 6 '11 at 1:28
For shame, bad asker! Editing a question such that it becomes an entirely different one is rude and confusing; it makes all previous answers and comments incomprehensible. – Henning Makholm Nov 6 '11 at 1:39

The minimum that $r$ could possibly be is $C=\sum\limits_{i=1}^\infty\frac{1}{p_i^2}$. However, a sequence of $1$s and $2$s can be chosen so that $r$ can be any real number not less than $C$. Since $\sum\limits_{i=1}^\infty\left(\frac{1}{p_i}-\frac{1}{p_i^2}\right)$ diverges, consider the sum $$S_n=\sum_{i=1}^n b_i\left(\frac{1}{p_i}-\frac{1}{p_i^2}\right)$$ where $b_i$ is $0$ or $1$. Choose $b_n=1$ while $S_{n-1}+\frac{1}{p_n}-\frac{1}{p_n^2}\le L-C$ and $b_n=0$ while $S_{n-1}+\frac{1}{p_n}-\frac{1}{p_n^2}>L-C$.
If we let $a_i=1$ when $b_i=1$ and $a_i=2$ when $b_i=0$, then $$\sum\limits_{i=1}^\infty\frac{1}{p_i^{a_i}}=\sum\limits_{i=1}^\infty\frac{1}{p_i^2}+\sum_{i=1}^\infty b_i\left(\frac{1}{p_i}-\frac{1}{p_i^2}\right)=C+(L-C)=L$$ The question with non-negative integers in the denominator:
Changing $p_n$ from the $n^{th}$ prime to $n$ simply allows us to specify $C=\frac{\pi^2}{6}$. The rest of the procedure follows through unchanged. That is, choose any $L\ge C$ and let $$S_n=\sum_{i=1}^n b_i\left(\frac{1}{i}-\frac{1}{i^2}\right)$$ where $b_i$ is $0$ or $1$. Choose $b_n=1$ while $S_{n-1}+\frac{1}{n}-\frac{1}{n^2}\le L-C$ and $b_n=0$ while $S_{n-1}+\frac{1}{n}-\frac{1}{n^2}>L-C$.
If we let $a_i=1$ when $b_i=1$ and $a_i=2$ when $b_i=0$, then $$\sum\limits_{n=1}^\infty\frac{1}{n^{a_i}}=\sum\limits_{n=1}^\infty\frac{1}{n^2}+\sum_{n=1}^\infty b_n\left(\frac{1}{n}-\frac{1}{n^2}\right)=C+(L-C)=L$$ We don't need to worry about an infinite final sequence of $1$s in the binary number since that would map to a divergent series.