Ramanujan theta function and its continued fraction I believe Ramanujan would have loved this kind of identity.
After deriving the identity, I wanted to share it with the mathematical community. If it's well known, please inform me and give me some links to it.
Let $q=e^{2\pi\mathrm{i}\tau}$, then
$$(1+q^{2}+q^{6}+q^{12}+q^{20}+q^{30}+\cdots)^{2}=\cfrac{1}{1+q-\cfrac{q(1+q)^2}{1+q^3+\cfrac{q^2(1-q^2)^2}{1+q^5-\cfrac{q^3(1+q^3)^2}{1+q^7+\ddots}}}}$$
for $|q|\lt1$.
If possible, please provide more examples of this nature, available in the literature.
 A: To clarify,  what you found is a q-continued fraction for the Jacobi theta function $\vartheta_2(0,q)$. Using ccorn's formulation,
$$\left(\frac{\vartheta_2(0,q)}{2\,q^{1/4}}\right)^2 =\Big(\sum_{n=0}^\infty q^{n(n+1)}\Big)^2 =\cfrac{1}{1-q+\cfrac{q(1\color{red}-q)^2}{1-q^3+\cfrac{q^2(1\color{red}-q^2)^2}{1-q^5+\cfrac{q^3(1\color{red}-q^3)^2}{1-q^7+\ddots}}}}\tag1$$
One can compare this to your other cfrac in this post,
$$\frac{1}{2\,q^{1/2}}\frac{\vartheta_2(0,q^2)}{\vartheta_3(0,q^2)}=\cfrac{1}{1-q+\cfrac{q(1\color{blue}+q)^2}{1-q^3+\cfrac{q^2(1\color{blue}+q^2)^2}{1-q^5+\cfrac{q^3(1\color{blue}+q^3)^2}{1-q^7+\ddots}}}}\tag2$$
They are beautifully similar, differing only in the $\pm$ within the square, though these two identities are not yet rigorously proven. (Update: The second was already established in 2005 by Michael Somos as the cfrac for sequence $A079006$ discussed in this answer.)
P.S. Ramanujan's octic cfrac can also express $(2)$, but I am unsure if there are q-cfracs for any of the $\vartheta_n(0,q)$. (I believe there are, but I'll have to go through my notes.)
A: I refer to your claim with the sign of $q$ adjusted so that it reads
$$\small(1+q^{2}+q^{6}+q^{12}+q^{20}+q^{30}+\cdots)^{2}
=\cfrac{1}{1-q+{\cfrac{q\,(1-q)^2}{1-q^3+\cfrac{q^2(1-q^2)^2}
{1-q^5+\cfrac{q^3(1-q^3)^2}{1-q^7+\cdots}}}}}$$
Given


*

*a related answer
introducing a continued fraction formula by Ramanujan with parameters
$a,b,q$ and making use of some Jacobi thetanull properties,

*plus another answer
where the formula and the thetanull stuff is applied again
with other settings of $a$ and $b$,

*and yet another one
where we found and applied the insight that whenever $ab=q$, the result
can be simplified along the same lines as before,
this time using the two-argument Jacobi theta functions,


you know what comes next.
But it does not get boring: This one comes with another twist and a slight
beautification.
As usual in posts like these,
I write $q_n = \exp\frac{2\pi\mathrm{i}\tau}{n}$, thus $q_n^n=q$,
and I consider expressions with $q_n$ implicity as functions of $\tau$.
I will again use Ramanujan's formula
$$\small\frac{(-a;q)_\infty\,(-b;q)_\infty - (a;q)_\infty\,(b;q)_\infty}
{(-a;q)_\infty\,(-b;q)_\infty + (a;q)_\infty\,(b;q)_\infty}
= \cfrac{a+b}{1-q+\cfrac{(a+bq)(aq+b)}{1-q^3+\cfrac{q\,(a+bq^2)(aq^2+b)}
{1-q^5+\cfrac{q^2(a+bq^3)(aq^3+b)}{1-q^7+\cdots}}}}\tag{*}$$
If you look at formula $(2)$ in my previous answer,
you may notice that, by pulling out the first factor of the
$q$-Pochhammer symbol containing $q^{-1}$, the identity
can be written in the fully symmetric form
$$\small\frac{(-a;q)_\infty\,(-b;q)_\infty
- (a;q)_\infty\,(b;q)_\infty}
{(-a;q)_\infty\,(-b;q)_\infty
+ (a;q)_\infty\,(b;q)_\infty}
= (a+b)\,\frac{(-a^2q^3;q^4)_\infty\,(-b^2q^3;q^4)_\infty}
{(-a^2q;q^4)_\infty\,(-b^2q;q^4)_\infty}
\qquad (ab=q)
\tag{**}$$
Combining $(*)$ and $(**)$, you get the following formula,
restricted to the case $ab=q$:
$$\small\cfrac{1}{1-q+\cfrac{(a+bq)(aq+b)}{1-q^3+\cfrac{q\,(a+bq^2)(aq^2+b)}
{1-q^5+\cfrac{q^2(a+bq^3)(aq^3+b)}{1-q^7+\cdots}}}}
= \frac{(-a^2q^3;q^4)_\infty\,(-b^2q^3;q^4)_\infty}
{(-a^2q;q^4)_\infty\,(-b^2q;q^4)_\infty}
\tag{***}$$
Note that the factor $(a+b)$ has been cancelled from both sides.
This is important because now we are going to use it for $a+b=0$ by continuity.
Concretely, set $a=-\mathrm{i}q_2$, $b=\mathrm{i}q_2$, so $ab=q$ and $a/b=-1$.
This yields
$$\begin{align}
\cfrac{1}{1-q+\cfrac{q\,(1-q)^2}{1-q^3+\cfrac{q^2(1-q^2)^2}
{1-q^5+\cfrac{q^3(1-q^3)^2}{1-q^7+\cdots}}}}
&\stackrel{(***)}{=}
\frac{(q^4;q^4)_\infty^2}{(q^2;q^4)_\infty^2}
\\  &\stackrel{(P1)}{=}
(q^4;q^4)_\infty^2\,(-q^2;q^2)_\infty^2
\\  &\stackrel{(P2)}{=}
(q^2;q^2)_\infty^2\,(-q^2;q^2)_\infty^4
\\  &\stackrel{(T1)}{=}
\left(\frac{\vartheta_2(0\mid2\tau)}{2q_4}\right)^2
\\  &\stackrel{(T2)}{=}
\left(\sum_{n=0}^\infty q^{n\,(n+1)}\right)^2
\end{align}$$
where $(\mathrm{P1})$ and $(\mathrm{P2})$ are $q$-Pochhammer symbol
manipulation rules like
$$\begin{align}
(-q;q)_\infty\,(q;q^2)_\infty &= 1              \tag{P1}
\\  (-q;q)_\infty\,(q;q)_\infty &= (q^2;q^2)_\infty \tag{P2}
\end{align}$$
and $(\mathrm{T1})$ refers to the product representation of $\vartheta_2$:
$$\vartheta_2(0\mid\tau) = 2q_8\,(-q;q)_\infty^2\,(q;q)_\infty  \tag{T1}$$
while $(\mathrm{T2})$ describes the series representation
$$\vartheta_2(0\mid\tau) = \sum_{k\in\mathbb{Z}} q_8^{(2k+1)^2}
= 2q_8\sum_{n=0}^\infty q^{n\,(n+1)/2}  \tag{T2}$$
which is linked with $(\mathrm{T1})$ by the
triple product identity.
Those ingredients are the same as for the other answers. Nothing new here.
That's it. Enjoy the formulae with more continued fractions of that sort.
