<s>[INST] Find $a_n$ such that the formula is equal to $\zeta(2)$ My question start with the observation :
$$\sqrt{e}\simeq \frac{\pi^2}{6}$$
At first glance it's not really convincing but after some work I found :
$$\sqrt{e-5\left(\frac{1}{\pi}-\frac{1}{e}\right)^{2}+2\left(\frac{1}{\pi}-\frac{1}{e}\right)^{3}+9\left(\frac{1}{\pi}-\frac{1}{e}\right)^{4}-4\left(\frac{1}{\pi}-\frac{1}{e}\right)^{5}}\simeq \frac{\pi^2}{6}$$
Wich is really better .
So now my question is clear :
If we have :
$$\sqrt{e-5\left(\frac{1}{\pi}-\frac{1}{e}\right)^{2}+2\left(\frac{1}{\pi}-\frac{1}{e}\right)^{3}+9\left(\frac{1}{\pi}-\frac{1}{e}\right)^{4}-4\left(\frac{1}{\pi}-\frac{1}{e}\right)^{5}+\cdots+a_n\left(\frac{1}{\pi}-\frac{1}{e}\right)^{n}+\cdots}=\frac{\pi^2}{6}$$
Where $a_n\in Z$
How to find $a_n$ ?
I don't find it in the librairy of integer .On the other hand it seems a bit artificial anyway perhaps there is some interest but I ignore it currently .
Thanks for your help .
Side notes :
$$\sqrt{e}=1+\sum_{k=1}^{\infty}\frac{1}{2^{k}k!}$$
We have also :
$\lim_{a\to \infty}\exp\left(\frac{a}{a+\frac{a}{\exp\left(a-\frac{a}{\exp\left(a\frac{a}{\exp\left(a+\frac{a}{\exp\left(a-\frac{a}{\exp\left(a-a\cdot\frac{a}{\exp\left(a...\right)}\right)}\right)}\right)}\right)}\right)}}\right)=e^{\frac{1}{2}}$
And see the wiki page about the Vieta's formula for $\pi$
 [/INST] As @Gevorg Hmayakyan says, the problem can be rephased as finding a sequence $a_n\in \mathbb{Z}$ such that
\begin{equation}
     \sum_{i=1}^\infty a_i \left(\frac{1}{\pi}-\frac{1}{e}\right)^{i}=\frac{\pi^4}{36}-e
\end{equation}
To to this, I use a greedy algorithm, i.e., in each step the error is maximally reduced. Therefore, $a_{n+1}=\mathrm{nint}(\tilde{a}_{n+1})$, where $\mathrm{nint}(\cdot)$ denotes the nearest integer,
\begin{equation}
    \tilde{a}_{n+1}:= \frac{\frac{\pi^4}{36}-e-\sum_{i=1}^n a_i \left(\frac{1}{\pi}-\frac{1}{e}\right)^{i}}{\left(\frac{1}{\pi}-\frac{1}{e}\right)^{n+1}}
\end{equation}
and $a_0=0$.
Now, we prove that the series converges. Note that, $|a_n-\tilde{a}_n|\leq \frac{1}{2}$, which implies that
\begin{equation}
     \left| \left(\frac{1}{\pi}-\frac{1}{e} \right)^n \tilde{a}_n - \left(\frac{1}{\pi}-\frac{1}{e}\right)^n a_n \right| \leq \frac{1}{2} \left|\frac{1}{\pi}-\frac{1}{e}\right|^{n}
\end{equation}
Using the definition of $\tilde{a}_n$,
\begin{equation}
     \left| \frac{\pi^4}{36} - e - \sum_{i=1}^n \left(\frac{1}{\pi}-\frac{1}{e}\right)^i a_i \right| \leq \frac{1}{2} \left|\frac{1}{\pi}-\frac{1}{e}\right|^{n}
\end{equation}
Since $\left(\frac{1}{e}-\frac{1}{\pi}\right) \approx 0.0496<1$, the series converges to $\frac{\pi^4}{36}- e$. Interestingly, note that $|\tilde{a}_n|\leq\frac{e \cdot \pi}{2(e-\pi)}\approx 10.08$, therefore, $|a_n|\leq 10$. Finally, any sequence $b_n$,
\begin{equation}
       b_{n+1}=\mathrm{nint}\left(\frac{h_n-\sum_{i=0}^n b_i g_n^i}{g_n^{n+1}}\right)
\end{equation}
where $b_0=0$, $h_n\rightarrow \frac{\pi^4}{36}-e$, and $g_n\rightarrow \frac{1}{\pi}-\frac{1}{e}$ as $n\rightarrow \infty$, satisfies
\begin{equation}
      \sum_{i=1}^\infty b_n \left(\frac{1}{\pi}- \frac{1}{e} \right)^i = \frac{\pi^4}{36}-e
\end{equation}
This follows since, $|h_n-\frac{\pi^4}{36}+e|\leq E_n$, where $E_n \rightarrow 0$, and
\begin{equation}
     \left|h_{n-1}-\sum_{i=1}^n g_n^i b_i\right| \leq \frac{g_n^n}{2}
\end{equation}
Therefore, $ \left|\frac{\pi^4}{36}-e-\sum_{i=1}^n g_n^i b_i\right|\leq \frac{g_n^n}{2}+ E_n$. Now, using that $g_n=\frac{1}{\pi}-\frac{1}{e}+\epsilon_n$, where $\epsilon_n\rightarrow 0$,
\begin{align}
    \left|\frac{\pi^4}{36}-e-\sum_{i=1}^n \left(\frac{1}{\pi}-\frac{1}{e}\right)^i b_i\right|&\leq \frac{g_n^n}{2}+ E_n+ \sum_{i=1}^n \sum_{j=0}^{i-1} \binom{i}{j} \left(\frac{1}{e}-\frac{1}{\pi}\right)^j \epsilon_n^{i-j}\\ & =\frac{g_n^n}{2}+ E_n+ \epsilon_n \sum_{i=1}^n \sum_{j=0}^{i-1} \binom{i}{j} \left(\frac{1}{e}-\frac{1}{\pi}\right)^j \epsilon_n^{i-j-1} \\& \leq \frac{g_n^n}{2}+ E_n+ \epsilon_n \left(\frac{1}{e}-\frac{1}{\pi}\right)^{-1}\sum_{i=1}^n \left[2\left(\frac{1}{e}-\frac{1}{\pi}\right)\right]^i \\ & \leq \frac{g_n^n}{2}+ E_n+ \epsilon_n \frac{2}{1-2\left(\frac{1}{e}-\frac{1}{\pi}\right)}
\end{align}
For example
\begin{equation}
       h_n= \left(\sum_{i=1}^n \frac{5}{2i^4}-\frac{1}{i!}\right) -1
\end{equation}
\begin{equation}
       g_n= \sum_{i=0}^n \frac{2\sqrt{2}}{9801} \frac{(4i)!(1103+26390i)}{(i!)^4 396^{4i}}- \frac{(-1)^i}{i!}
\end{equation}
</s>