Evaluate $\prod_{p \in \mathbb{P}} \left( 1 + \frac{3p^2}{(p^2 - 1)^2} \right)$ for prime numbers $p$, where $p = 14k \pm 1$ or $p = 18k \pm 1$ Evaluate :
$$\prod_{p \in \mathbb{P}} \left( 1 + \frac{3p^2}{(p^2 - 1)^2} \right)$$
for prime numbers $p$ such that
$$p = 14k \pm 1$$
or
$$p = 18k \pm 1.$$
(These are two different questions.) I managed to calculate it for all primes $p$ :
$$\prod_{p \in \mathbb{P}} \left( 1 + \frac{3p^2}{(p^2 - 1)^2} \right) = \prod_{p \in \mathbb{P}} \frac{p^4 + p^2 + 1}{(p^2 - 1)^2} = \prod_{p \in \mathbb{P}} \frac{(p^2 - p + 1)(p^2 + p + 1)}{(p^2 - 1)^2}$$
$$= \prod_{p \in \mathbb{P}} \frac{(p^3 - 1)(p^3 + 1)}{(p^2 - 1)^3} = \prod_{p \in \mathbb{P}} \frac{1 - p^{-6}}{(1 - p^{-2})^3} = \frac{\left\{ \zeta(2) \right\}^3}{\zeta(6)}$$
$$= \frac{35}{8}.$$
However, I have no clue about $p = 14k \pm 1$ and $p = 18k \pm 1;$
Can anyone help?
 A: Consider \begin{align}\zeta_1(s)&:=\prod_{p\not\equiv\pm1\pmod{14},p\nmid14}\frac{1-p^{-3s}}{(1-p^{-s})^3},\\
\zeta_2(s)&:=\prod_{p\equiv\pm1\pmod{14}}\frac{1-p^{-3s}}{(1-p^{-s})^3}.
\end{align}
We want to determine $\zeta_2(2)$. Up to the Euler factors corresponding to $p=2,7$ the product of $\zeta_1,\zeta_2$ is $\frac{\zeta(s)^3}{\zeta(3s)}$, thus it suffices to calculate $\zeta_1(2)$: $$\zeta_1(s)\zeta_2(s)\prod_{p\mid 14}\frac{1-p^{-3s}}{(1-p^{-s})^3}=\frac{\zeta(s)^3}{\zeta(3s)}.$$
Let $\chi_0$ be the trivial Dirichlet character mod $14$ and $\chi_1,\chi_2$ those of order $3$, i.e. such that $\chi_i(-1)=1$ for $i=1,2$. Let $\omega$ be a primitive third root of unity. Let $p$ be a prime such that $p\nmid 14$. Note that
\begin{align}
\frac{(1-\chi_1(p)T)(1-\chi_2(p)T)}{(1-\chi_0(p)T)^2}&=\begin{cases}\frac{(1-\omega T)(1-\omega^2T)}{(1-T)^2} &\text{if $p\not\equiv\pm1\pmod {14}$}\\ 1 &\text{if $p\equiv \pm1\pmod{14}$}\end{cases}\\
&=\begin{cases}\frac{1-T^3}{(1-T)^3} &\text{if $p\not\equiv\pm1\pmod {14}$}\\ 1 &\text{if $p\equiv \pm1\pmod{14}$}\end{cases}
\end{align}
Hence: $$\zeta_1(s) = \frac{L(\chi_0,s)^2}{L(\chi_1,s)L(\chi_2,s)}.$$
Now, the value of $L(\chi_0,2)$ should be easy to calculate from the value $\zeta(2)$ and I think one can get $L(\chi_1,2)$ using similar methods as here or here.
Edit: Using the cotangent residue trick we see that $$L(\chi_1,2)=\frac{\pi^2}{14^2}(\omega\sin^{-2}(\frac{3\pi}{14})+\sin^{-2}(\frac{\pi}{14})+\omega^2\sin^{-2}(\frac{5\pi}{14}))$$ (if we choose $\omega$ such that $\chi_1(3)=\omega$ but this doesn't really matter) and similarly$$L(\chi_2,2)=\frac{\pi^2}{14^2}(\omega^2\sin^{-2}(\frac{3\pi}{14})+\sin^{-2}(\frac{\pi}{14})+\omega\sin^{-2}(\frac{5\pi}{14})).$$ According to Wolfram Alpha the product of these two values is $$L(\chi_1,2)L(\chi_2,2)=\frac{\pi^4}{14^4}\cdot 336.$$
Thus $\zeta_1(2)=\frac{12}{7}$ as $L(\chi_0,2)=\zeta(2)(1-2^{-2})(1-7^{-2})$. And we get: $$\prod_{p\equiv\pm1\pmod{14}} \left( 1 + \frac{3p^2}{(p^2 - 1)^2} \right)=\zeta_2(2)=\frac{\zeta(2)^3}{\zeta(3s)}\zeta_1(2)^{-1}\prod_{p\mid 14}\frac{(1-p^{-2})^3}{1-p^{-6}}=\frac{840}{817}.$$
The same methods should work for for the case mod $18$. (because in both cases $(\Bbb Z/m\Bbb Z)^\times\cong C_6$.)
