$\lim_{x\to 1^-}\sqrt{1-x}\ \left(1+x+x^4+x^9+x^{16}+x^{25}+\cdots\right)=\sqrt{\pi}/2$ is true?

When I was considering limits of various functions, I had the following conjecture.

$$\lim_{x \to 1^-}\sqrt{1-x}\ \sum_{k=0}^{\infty}x^{\left(k^2\right)}=\lim_{x\to 1^-}\sqrt{1-x}\ \left(1+x+x^4+x^9+x^{16}+x^{25}+\cdots\right)=\frac{\sqrt{\pi}}{2}$$

This seems true, but I can't prove that. If this is true, how can we prove that? If this is not true, what is the answer?


Let $$ f(x)=1+\sum_{n\geq 1} x^{n^2}=\frac{1+\vartheta_3(x)}{2}. $$ Then for any $x$ such that $|x|<1$ we have: $$ f(x)^2 = 1+\sum_{n\geq 1} r_2(n)\,x^n $$ where: $$ r_2(n) = \#\left\{(a,b)\in\mathbb{N}_0^2: a^2+b^2=n\right\}, $$ and since the last number theoretic function is well-known, and leads to the following Lambert series identity about the Jacobi theta function $\vartheta_3$: $$ \vartheta_3(x)^2 = 1+4\left(\frac{x}{1-x}-\frac{x^3}{1-x^3}+\frac{x^5}{1-x^5}-\frac{x^7}{1-x^7}+\ldots\right)\tag{1}$$ your limit is just the positive square root of: $$ \frac{1}{1}-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots=\arctan(1)=\frac{\pi}{4}\tag{2}$$ proving your conjecture.


We have the following theorem from G. Polya's book:

Theorem: Let for the monotonic function $f$ , $\int_{0}^\infty f(x)dx$ exists and we have $\lim_{x\to\infty}f(x)=0$ and $f(x)>0$ then we have

$$\lim_{h\to0^+}h\sum_{v=0}^\infty f(vh)=\int_{0}^\infty f(x)dx.$$

By using this theorem we can show,

$$\lim_{t\to 1^{-}}\sqrt[\alpha]{1-t}(1+t^{1^\alpha}+t^{2^\alpha}+t^{3^\alpha}+\cdots+t^{n^\alpha}+\cdots)=\frac{1}{\alpha}\Gamma(\frac{1}{\alpha}).$$

We need to take in previous theorem $t=e^{-h^{\alpha}}$ and $f(x)=e^{-x^\alpha}$ and since $\Gamma(\alpha)=\int_0^\infty e^{-x}x^{\alpha-1}dx$ and $\ln(1-t)\cong 1-t$.

See this book: G. Polya and Gabor Szegö, Problems and theorems in analysis , vol. I, Springer.


From the first relation here and $\tau = \textrm{i}\alpha$ for $\alpha >0$ it follows that $$ \sqrt{\alpha} \sum_{k\in\mathbb{Z}} e^{-\pi\alpha k^2}= \sum_{k\in\mathbb{Z}}e^{-\pi\alpha^{-1}k^2}.$$ For $\alpha\downarrow 0$ this shows that $$ \lim_{\alpha\downarrow 0}\sqrt{\alpha} \sum_{k\in\mathbb{Z}} e^{-\pi\alpha k^2}= 1.$$ Now $$ \lim_{\alpha\downarrow 0}\sqrt{\alpha} \sum_{k\in\mathbb{Z}} e^{-\pi\alpha k^2} = \lim_{\alpha\downarrow 0} \sqrt{\frac{1-e^{-\pi\alpha}}{\pi}}\left(1+2\sum_{k\geq 1}e^{-\pi \alpha k^2}\right) $$ and with $x=e^{-\pi\alpha}$ your result follows.