Proving that $\frac{\pi ^2}{p}\neq \sum_{n=1}^{\infty }\frac{1}{a_{n}^2}$ we have many formula for $\pi ^2$ as follow $$\frac{\pi ^2}{6}=\frac{1}{1^2}+\frac{1}{2^2}+\frac{1}{3^2}....$$
and $$\frac{\pi ^2}{8}=\frac{1}{1^2}+\frac{1}{3^2}+\frac{1}{5^2}....$$ and for $\frac{\pi ^2}{9}$, $\frac{\pi ^2}{12}$, $\frac{\pi ^2}{16}$,$\frac{\pi ^2}{24}$.. and so on. If you see the number in denominator is not prime.Now we want to prove that
  $$\frac{\pi ^2}{p}\neq \sum_{n=1}^{\infty }\frac{1}{a_{n}^2}$$ Where $p$ is a prime number and $a_{n}$ a positive integer number
 A: I ran the greedy algorithm from the previous question for the first 1000 primes with the added caveat that the terms in the sequence have to be distinct. It appears that your statement is only true for the primes 2, 3, 5, 11, 13 and false for the rest! I've only used 40 terms in the algorithm for each of the primes. For those that work, the accuracy is quite good (hundreds of digits for the larger primes). For example if $A_p$ stands for the terms for prime p then
$$A_7 = \{1, 2, 3, 5, 11, 42, 991, 59880, 21165404, 81090759408,\ldots \}$$
and if $S_p(n)$ stands for the partial sum we have
$$S_7(10) = \frac{9409086091684410250487330038662170074145032522104397}{66733781786148561048500788381308231
   67971682291718400} $$
with
$$\frac{\pi^2}{7}- S_7(10) \approx 3.0292 \cdot 10^{-34}$$
EDIT: I ran the algorithm again but this time with the integers from 1 to 100 because I suspected the problem is not just with the primes themselves. The algorithm failed to converge within 15 terms for the numbers
$$E = \{1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15\}$$
The algorithm is way off for these integers. I'm willing to conjecture that for every integer $k\notin E$ there exists a sequence of positive integers $a_{n,k}$ such that
$$\frac{\pi^2}{k} = \sum_{n = 1}^{\infty} \frac{1}{a_{n,k}^2}$$
A: If you don't want to put any restrictions on the $a_n$, there is no number theory here, only analysis. If I may quote from my previous answer:

Theorem: Let $\sum_k s_k$ be a convergent sum of positive numbers, say $S=\sum_k s_k$. Suppose that, for all $n$, we have $s_n < \sum_{k=n+1}^\infty s_k$. Then there is a subsequence of $s_k$ whose sum converges to $x$ for any positive $x < S$.

Intuitively, say we're trying to construct a subsequence. The sum is convergent, so its terms must become arbitrarily small and thus allow us to approach $x$ arbitrarily closely. The only thing that can go wrong is that at some point all the  terms we have left aren't big enough to get us to $x$. The condition $s_n < \sum_{k=n+1}^\infty s_k$ ensures that, whenever this happens, we'll have room to use the earlier term $s_n$ without exceeding $x$, and so the only way we can't get to $x$ is if we were already using all the earlier terms (i.e., $x>S$).
The series $\sum_{k=2}^\infty \frac{1}{n^2}$ satisfies the hypotheses of this theorem, and so we can write any number less than $\sum_{k=2}^\infty \frac{1}{n^2}=\frac{\pi^2}{6}-1$ as a sum of the reciprocals of distinct squares (with $a_1>1$). Similarly, if $1 < x < \frac{\pi^2}{6}$, we can write $x-1$ as a sum of the reciprocals of distinct squares, and then throw in a $1$ at the beginning to get such a representation for $x$ (with $a_1=1$).
In particular, if $p$ is prime, $\frac{\pi^2}{p}$ can be written in the form you want unless $p \in \{2,3,5,11,13\}$. But that has nothing to do with their primality: it's all about the gross size of $\frac{\pi^2}{p}$.
The interesting number theory happens when you put further conditions on the $a_n$, such as requiring them to be in arithmetic progression...
