After this post, I started wondering about possible approximations of the infinite product $$A_p=\prod _{k=p+1}^{\infty } \cos \left(\frac{p \,\pi}{2 k}\right)\tag 1$$ where $p$ is an integer. As far as I could see, there is no closed form expressions.
So, as I did in the linked question, I used Bhaskara I's approximation (for $-\frac \pi 2 \leq x\leq\frac \pi 2$) $$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\implies \cos\left(\frac{p\,\pi}{2k}\right)=\frac{4 \left(k^2-p^2\right)}{4 k^2+p^2}$$ and then computed $$B_p=\prod _{k=p+1}^{\infty }\frac{4 \left(k^2-p^2\right)}{4 k^2+p^2}=\frac{\Gamma \left( p+1-i\frac p 2\right)\,\, \Gamma \left( p+1+i\frac p 2\right)}{(2p)!}\tag 2$$ which does not seem to be very bad (see the table below).
Using Stirling approximation and Taylor series for supposed large values of $p$, I ended with $$\log(B_p)=\frac 12\log \left(\frac{5\pi}{4}\right)-\left(\log \left(\frac{16}{5}\right)+\cot ^{-1}(2)\right)p+\frac 12 \log(p)+\frac{11}{120 p}+O\left(\frac{1}{p^3}\right)\tag 3$$ What is interesting is to notice that $$\log \left(\frac{16}{5}\right)+\cot ^{-1}(2)\approx 1.62680$$ which is not so far from $\frac \pi 2$ ($3.56$% relative difference) and this already bring questions (at least, to me).
What is interesting is to see how close are the numbers in a logarithmic scale. $$\left( \begin{array}{cccc} p & (2) & (3) & (1) \\ 1 & -0.85190 & -0.85120 & -0.84448 \\ 2 & -2.17732 & -2.17725 & -2.16333 \\ 3 & -3.61661 & -3.61660 & -3.59727 \\ 4 & -5.10720 & -5.10719 & -5.08299 \\ 5 & -6.62701 & -6.62700 & -6.59815 \\ 6 & -8.16570 & -8.16570 & -8.13233 \\ 7 & -9.71760 & -9.71760 & -9.67979 \\ 8 & -11.2793 & -11.2793 & -11.2371 \\ 9 & -12.8485 & -12.8485 & -12.8019 \\ 10 & -14.4236 & -14.4236 & -14.3727 \\ 20 & -30.3496 & -30.3496 & -30.2557 \\ 30 & -46.4164 & -46.4164 & -46.2798 \\ 40 & -62.5413 & -62.5413 & -62.3621 \\ 50 & -78.6981 & -78.6981 & -78.4764 \end{array} \right)$$
Just out of curiosity, for $1 \leq p \leq 50$, I adjusted the parameters for the model $$\log(A_p)=a+b\,p+c\log(p)+\frac d p$$ and obtained a real good fit $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & +0.69204 & 0.00006 & \{+0.69193,+0.69216\} \\ b & -1.62255 & 0.00000 & \{-1.62256,-1.62255\} \\ c & +0.50040 & 0.00003 & \{+0.50035,+0.50045\} \\ d & +0.08598 & 0.00007 & \{+0.08583,+0.08613\} \\ \end{array}$$ while is $(3)$, the coefficients are $(+0.68394,-1.62680,+0.50000,+0.09167)$ that is to say very very close.
For sure, all of this shows the high quality of the approximation of $\cos(x)$ but asks me questions about the value of $A_p$. If we truncate $(3)$ to $O\left(\frac{1}{p}\right)$,we should have $$A_p\sim \sqrt{\frac{5\pi p} 4 }\,e^{-\alpha \pi p}$$ with $\alpha \approx \frac 12$.
I wonder if we could find another better approximation of $A_p$ even at the price of more complex functions. Any idea would be welcome.
Considering that Bhaskara I's approximation $$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\qquad \text{for} \qquad -\frac \pi 2 \leq x\leq\frac \pi 2$$ looks like a Padé approximant, I had the feeling that I could either pure Padé approximants built at $x=0$, that is to say $$f_n=\frac {1+\sum_{m=1}^n a_m x^{2m}}{1+\sum_{m=1}^n b_m x^{2m}}$$ or, may be better, $$g_n=\left(1-\frac{2x}{\pi }\right) \left(1+\frac{2x}{ \pi }\right)\frac {1+\sum_{m=1}^{n-1} c_m x^{2m}}{1+\sum_{m=1}^n d_m x^{2m}}$$ the second rational fraction being the Padé approximant of $\frac{\cos (x)}{\left(1-\frac{2x}{ \pi }\right) \left(1+\frac{2x}{ \pi }\right)}$; $g_n$ was chosen as potentially better than $f_n$ because the calculations will start closer and closer to $\frac \pi 2$. To confirm the validity of this choice were computed $$I_n=\int_0^{\frac \pi 2} \big(\cos(x)-f_n\big)^2\,dx \qquad \text{and}\qquad J_n=\int_0^{\frac \pi 2} \big(\cos(x)-g_n\big)^2\,dx$$ The table below shows clearly the superiority of $g_n$. $$\left( \begin{array}{ccc} n & I_n & J_n \\ 1 & 7.086 \times 10^{-5} & 7.962 \times 10^{-6} \\ 2 & 6.754 \times 10^{-11} & 1.909 \times 10^{-12} \\ 3 & 2.375 \times 10^{-18} & 3.014 \times 10^{-20} \end{array} \right)$$ while $$\int_0^{\frac \pi 2} \Big(\cos(x)-\frac{\pi ^2-4x^2}{\pi ^2+x^2}\Big)^2\,dx =1.489\times 10^{-6}$$
Now, replacing $x$ by $\frac {p \pi}{2k}$ makes $$\cos \left(\frac{\pi p}{2 k}\right)=\frac {P_{m}(k^2)}{Q_{m}(k^2)}$$ where $P_m$ and $Q_m$ are homogeneous polynomials. $P_m$ shows only one real root and $Q_m$ only complex roots. By the end, limited to $n=2$, we can write $$\cos \left(\frac{\pi p}{2 k}\right)=\frac{(k-r_1 p)\,(k+r_1p)\,(k-r_2p)\,(k+r_2p)} {(k-s_1 p)\,(k+s_1p)\,(k-s_2p)\,(k+s_2 p) }$$ and if $$A_p=\prod _{k=p+1}^{\infty } \cos \left(\frac{p \,\pi}{2 k}\right)$$ then $$A_p\sim\frac{\Gamma [1+(1-s_1) p]\, \Gamma [1+(1+s_1) p]\, \Gamma [1+(1-s_2) p]\, \Gamma [1+(1+s_2) p]}{\Gamma [1+(1-r_1) p]\, \Gamma [1+(1+r_1) p]\,\Gamma [1+(1-r_2) p]\, \Gamma [1+(1+r_2) p]}$$
This leads to the following results (for the logarithms) $$\left( \begin{array}{cccc} p & \text{using } f_n & \text{using } g_n& \text{exact} \\ 1 & -0.844481 & -0.844481 & -0.844481 \\ 2 & -2.163326 & -2.163329 & -2.163327 \\ 3 & -3.597265 & -3.597275 & -3.597270 \\ 4 & -5.082976 & -5.082997 & -5.082989 \\ 5 & -6.598132 & -6.598168 & -6.598155 \\ 6 & -8.132292 & -8.132346 & -8.132328 \\ 7 & -9.679735 & -9.679810 & -9.679787 \\ 8 & -11.23699 & -11.23708 & -11.23706 \\ 9 & -12.80178 & -12.80190 & -12.80187 \\ 10 & -14.37255 & -14.37270 & -14.37266 \\ 20 & -30.25528 & -30.25578 & -30.25570 \\ 30 & -46.27897 & -46.27993 & -46.27979 \\ 40 & -62.36080 & -62.36228 & -62.36208 \\ 50 & -78.47457 & -78.47661 & -78.47636 \end{array} \right)$$ which looks much better than in my post.