Can every positive real number $\leqslant\frac{\pi^2}6$ be expressed in this form?

It's neither discrete nor do its possible values cover the entire interval. We can essentially solve this question via the following lemma:

Lemma: Let $s_n$ be any sequence of non-negative real numbers with the property that $s_n \leq \sum_{i=n+1}^{\infty}s_n$ and $\lim_{n\rightarrow\infty}s_n = 0$. Then, for any $0\leq x \leq \sum_{i=1}^{\infty}s_n$, there is some subset $S\subseteq \mathbb N$ such that $x=\sum_{i\in S}s_i$.

The proof proceeds by greedily constructing $S$: we recursively define $S$ by the rule that $n\in S$ if and only if $s_n + \sum_{i\in S\cap [1,n)}s_i \leq x$. Otherwise said, we construct $S$ by enumerating the natural numbers and adding a number to $S$ if adding that element does not make the partial sum exceed the target $x$.

Clearly, $\sum_{i\in S}s_i\leq x$ since this is true, by definition, for the sum of the elements $s_i$ where $i\in S\cap [1,n]$. We can then prove that $\sum_{i\in S}s_i \geq x$ and therefore that $\sum_{i\in S}s_i = x$ by splitting into cases:

Case 1: $\mathbb N\setminus S$ is unbounded.

In this case, we can notice that if $n\not\in S$ we must have that $$\sum_{i\in S}s_i \geq \sum_{i\in S\cap [1,n)}s_i > x - s_n.$$ However, since $\lim_{n\rightarrow\infty}s_n=0$, we can conclude that $\inf \{s_n : n\not\in S\} = 0$ and then, taking suprema of both side of the above equation over all $n\not\in S$ gives $$\sum_{i\in S}s_i \geq x$$ as desired.

Case 2: $S = \mathbb N$

In this case, we note that we have $\sum_{i=1}^{\infty}s_i \geq x$ by hypothesis, but since $\sum_{i=1}^{\infty} s_i = \sum_{i\in S}s_i$, we automatically have the equality we want.

Case 3: $\mathbb N\setminus S$ is bounded and non-empty.

We will show that this case can never occur by deriving a contradiction. Let $n\in\mathbb N$ be the largest element not in $S$. We have already seen that $$\sum_{i\in S}s_i=\sum_{i\in S\cap [1,n)}s_i+\sum_{i=n+1}^{\infty}s_i \leq x.$$ However, note that we know $s_n \leq \sum_{i=n+1}^{\infty}s_i$ by hypothesis, therefore $$\sum_{i\in S\cap [1,n)}s_i + s_n \leq x$$ by substituting in this inequality to the earlier one. This, however, would imply that $s_n \in S$ by definition of $S$, which contradicts that we chose $n$ to be in the complement of $S$. Thus, this case may never occur.

However, also note that, for any term $n$ not in $S$, we have that $\sum_{i\in S}s_i \geq \sum_{i\in S\cap [1,n)}s_i > x - s_n$.

Having handled every case, we have established the lemma.

Then, to finish, we observe that, while the sequence $s_n=\frac{1}{n^2}$ fails to satisfy this property, it does satisfy this property if we truncate off the first term - since $\frac{1}4 \leq \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + \frac{1}{36} + \frac{1}{49}$ and since, at every point further into the sequence, the ratio of consecutive terms is less than $2$. Thus, we can conclude that the set of points that can be written as $\sum_{i\in S}\frac{1}{i^2}$ is exactly $[0,\frac{\pi^2}6-1] \cup [1,\frac{\pi^2}6]$ using that $\sum_{i=1}^{\infty}\frac{1}{i^2}=\frac{\pi^2}6$.


As a side-note, it is worth noting that this doesn't imply that the distribution is continuous - a process such as "randomly choose the binary digits of a real number in $[0,1)$ by independent Bernoulli trials with parameter $p$" yields a distribution which has fractal-like properties and which is not continuous (i.e. has no probability density function) unless $p=1/2$ - it is an example of a singular distribution (with respect to the uniform distribution), which needn't be discrete. According to Random Variables with Independent Binary Digits by Marsaglia:

"Let $X = . b_1b_2b_3\dots$ be a random variable with independent binary digits $b_n$ taking values $0$ or $1$ with probability $p_n$ and $q_n = 1 -p_n$. When does $X$ have a density? A continuous density? A singular distribution? This note gives necessary and sufficient conditions for the distribution of $X$ to be: discrete: $\sum\min (p_n, q_n) < \infty$; singular: $\sum_m^\infty[\log (p_n/q_n)]^2=\infty$ for every $m$; absolutely continuous: $\sum_m^\infty[\log (p_n/q_n)]^2 < \infty$ for some $m$".

The example in the question truly is continuous (i.e. is defined by a probability density function) for all $p\in (0,1)$, primarily because the sequence $\frac{1}{n^2}$ does not decrease very quickly. One can prove this most easily via characteristic functions, although I would bet it's possible to prove from more elementary results such as the Berry-Esseen theorem.


The sum $\sum_{n=2}^{\infty} {1 \over n^2}$ is less than $1$, so if $r$ satisfies $\sum_{n=2}^{\infty} {1 \over n^2} < r < 1$ you won't be able to express $r$ in the desired form. If you include $1$ in the sum, the result would be greater than $r$, and if you didn't include $1$ the result would be at most $\sum_{n=2}^{\infty} {1 \over n^2} < r$.