Let $q=e^{2\pi i\tau}$. If $\theta_2$ and $\theta_3$ are jacobi theta functions , is it true that the ratio of the two functions can be expressed as a continued fraction of the form

$$ \frac{\theta_2(q^2)}{\theta_3(q^2)}=2q^{1/2}\prod_{n=1}^\infty \frac{(1+q^{4n})^2}{(1+q^{4n-2})^2}=\cfrac{2q^{1/2}}{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|\lt 1$?

  • $\begingroup$ Seems to match Sergei N. Gladkovskii's comment in OEIS A079006 with $x=q^2$ $\endgroup$
    – ccorn
    Jul 18, 2015 at 13:15
  • $\begingroup$ Indeed it is. Remember by using the jacobi's triple product ,the ratio of jacobi theta functions becomes $$\theta_2(q^2)/\theta_3(q^2)=2q^{1/2}\prod_{n=1}^\infty \frac{(1+q^{4n})^2}{(1+q^{4n-2})^2}$$ $\endgroup$
    – Nicco
    Jul 18, 2015 at 18:54
  • $\begingroup$ I have just learned that the function$ \frac{\theta_2(q^2)}{\theta_3(q^2)}$ satisfies many modular equations. See mathworld.wolfram.com/ModularEquation.html ,thus one can use them to evaluate the continued fraction. $\endgroup$
    – Nicco
    Jul 18, 2015 at 20:28

2 Answers 2


The answer is yes. Given the nome $q = \exp(i\pi\tau)$, elliptic lambda function $\lambda(\tau)$, Dedekind eta function $\eta(\tau)$, Jacobi theta functions $\vartheta_n(0,q)$, and Ramanujan's octic cfrac, the following relations are known,

$$\begin{aligned} u(\tau) & = \big(\lambda(\tau)\big)^{1/8} = \frac{\sqrt{2}\, \eta(\tfrac{\tau}{2})\, \eta^2(2\tau)}{\eta^3(\tau)} = \left(\frac{\vartheta_2(0, q)}{\vartheta_3(0, q)}\right)^{1/2}\\ & = \cfrac{\sqrt{2}\, q^{1/8}}{1 + \cfrac{q}{1 + q + \cfrac{q^2}{1 + q^2 + \cfrac{q^3}{1 + q^3 + \ddots}}}} \end{aligned}\tag1$$

If we define the cfrac, $$W(q) = \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}}}}$$

we get the $q$-series,

$$W(q) = 1 - 2q^2 + 5q^4 - 10q^6 + 18q^8 - 32q^{10} + \dots$$

and which is defined in A079006 (after scaling) as the expansion of,

$$W(q) = \frac{1}{q^{1/2}}\left(\frac{\eta(q^2)\, \eta^2(q^8)}{\eta^3(q^4)}\right)^2 = \frac{1}{q^{1/2}}\left(\frac{\eta(2\tau)\, \eta^2(8\tau)}{\eta^3(4\tau)}\right)^2 $$

in powers of $q$. From $(1)$, and since the definition of the Dedekind eta uses the square of the nome as $q = e^{2\pi i \tau}$, we get,

$$\frac{\sqrt{2}\,\eta(2\tau)\, \eta^2(8\tau)}{\eta^3(4\tau)} = \left(\frac{\vartheta_2(0, q^2)}{\vartheta_3(0, q^2)}\right)^{1/2}$$

With basic algebraic substitutions, one then finds that,

$$W(q) = \frac{1}{2q^{1/2}}\frac{\vartheta_2(0, q^2)}{\vartheta_3(0, q^2)}$$

which is exactly what the OP wished to prove. (QED.)

(In fact, Michael Somos in a Sept 2005 comment in the same OEIS link already gave the same cfrac with $q = x^2$.)

(Some more background for those interested.)

As was pointed out, $\lambda(\tau)$ obeys modular equations. For ex, if $u = \big(\lambda(\tau)\big)^{1/8}$ and $v = \big(\lambda(5\tau)\big)^{1/8}$, then,

$$\Omega_5(u,v) :=u^6 - v^6 + 5u^2 v^2(u^2 - v^2) + 4u v(u^4 v^4 - 1)=0$$

Because of $\Omega_5$, these functions can be used to solve the general quintic, as partly described in this post. And if $k = \lambda(\tau)$ and $l = \lambda(7\tau)$, then,

$$\Omega_7 := (kl)^{\color{red}{1/8}} + \big((1-k)(1-l)\big)^{\color{red}{1/8}} = 1$$

correcting a typo in the Mathworld link with the exponent. Also, $k=\lambda(\sqrt{-n})$, computed in Mathematica as ModularLambda[Sqrt[-n]], is important since it solves the equation,

$$\frac{K'(k)}{K(k)} = \frac{\text{EllipticK[ 1 - ModularLambda[Sqrt[-n]] ]}}{\text{EllipticK[ ModularLambda[Sqrt[-n]] ]}} =\sqrt{n}$$

where $K(k)$ is the complete elliptic integral of the first kind. For example, in his second letter to Hardy, Ramanujan gave the brilliant solution when $n=210$ as,

$$k = \lambda(\sqrt{-210}) = ab \approx 2.706\times 10^{-19}$$


$$a =\big((\sqrt{15}-\sqrt{14})(8-3\sqrt{7})(2-\sqrt{3})(6-\sqrt{35})\big)^2$$

$$b =\big((1-\sqrt{2})(3-\sqrt{10})(4-\sqrt{15})(\sqrt{7}-\sqrt{6})\big)^4$$

So we have this beautiful evaluation of the continued fraction,

$$(ab)^{1/8} = \cfrac{\sqrt{2}\, q^{1/8}}{1 + \cfrac{q}{1 + q + \cfrac{q^2}{1 + q^2 + \ddots}}}$$

when $q = e^{-\pi\sqrt{210}}$.

  • $\begingroup$ @ Tito Piezas this is a great piece of answer,unfortunately I can't be able to accept it since my previous account was closed for some unknown reasons,+1. $\endgroup$
    – Nicco
    Aug 22, 2015 at 17:21
  • $\begingroup$ @ Tito PiezasIII it's also possible to use the fact that the square of ramanujan's octic cfrac is a hauptmodul ,as a result it is related to the j-function. $\endgroup$
    – Nicco
    Aug 22, 2015 at 22:28
  • $\begingroup$ I have stumbled upon a formula by Ramanujan that explains this cfrac. One of the available proofs shows that it is a very special case of a Heine continued fraction, cleverly applied to the odd and even parts of a series given by the q-binomial theorem. Kindly see my answer. $\endgroup$
    – ccorn
    Sep 30, 2015 at 9:01

For those interested, here is an outline of a proof.

To prepare the ground, let $\mathbb{H}$ be the complex upper half plane, $\tau\in\mathbb{H}$ and $$\begin{align} q_n &\stackrel{\text{def}}{=} \exp\frac{2\pi\mathrm{i}\tau}{n} \\ q &\stackrel{\text{def}}{=} q_1 \end{align}$$ so I can write $q_2$ instead of $q^{1/2}$ etc.

Furthermore, let us define variants of the Jacobi thetanulls that are considered functions of $\tau$, albeit indirectly via $q_n$: $$\begin{align} \varTheta_{00}(\tau) &= \sum_{k\in\mathbb{Z}} q_2^{k^2} = \theta_3(q_2) \\ \varTheta_{01}(\tau) &= \varTheta_{00}(\tau+1) = \sum_{k\in\mathbb{Z}} (-q_2)^{k^2} = \theta_3(-q_2) = \theta_4(q_2) \\ \varTheta_{10}(\tau) &= \sum_{k\in\mathbb{Z}} q_8^{(2k+1)^2} = 2q_8\sum_{n=0}^\infty q^{n(n+1)/2} = \theta_2(q_2) \end{align}$$ Accordingly, the $\theta_2(q^2)/\theta_3(q^2)$ used in the question is identified with $\varTheta_{10}(4\tau)/\varTheta_{00}(4\tau)$ herein.

The introduction of $\tau$ is not much needed here because we do not make use of modular transforms. Yet it is useful for occasional references to other standard functions; and it saves us from branching issues like the one above where $\theta_2$ is formally considered a function of $q_2$ despite its definition being based on $q_8$. Apart from those notational issues, the actual calculations are better done with the $q_n$ in mind.

While we are at it, let us split the series for $\varTheta_{00}$ and $\varTheta_{01}$ into parts that are even resp. odd in $q_2$. Doing so, we find $$\begin{align} \varTheta_{00}(\tau) &= \varTheta_{00}(4\tau) + \varTheta_{10}(4\tau) \tag{1a} \\ \varTheta_{01}(\tau) &= \varTheta_{00}(4\tau) - \varTheta_{10}(4\tau) \tag{1b} \end{align}$$ We will use product representations of some thetanulls as well. Jacobi's triple product identity yields $$\begin{align} \varTheta_{00}(\tau) &= (-q_2;q)_\infty^2\,(q;q)_\infty \tag{2a} \\ \varTheta_{01}(\tau) &= (q_2;q)_\infty^2\,(q;q)_\infty \tag{2b} \end{align}$$ You will recognize the use of $q$-Pochhammer symbols here. I will presume some familiarity with the manipulation of $q$-Pochhammer symbols. The above product representations of Jacobi thetanulls can be subjected to such manipulations and thereby be transformed beyond recognition, but the displayed formulae are what we can use directly.

I would introduce some more ingredients, but this is the web and readers are getting impatient, so let us head forward now and get the remaining tools along the way as we need them.

The key is a marvelous identity listed as entry 11 in Ramanujan's second notebook, chapter 16. After flipping the sign of a parameter $b$ everywhere, it reads $$\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{*}$$ and it is easy to apply this to our case by setting $a=b=q_2$. Thus we get $$\begin{align} \cfrac{2q_2}{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}}}} &= \frac{(-q_2;q)_\infty^2 - (q_2;q)_\infty^2} {(-q_2;q)_\infty^2 + (q_2;q)_\infty^2} \\ &\stackrel{(2)}{=} \frac{\varTheta_{00}(\tau) - \varTheta_{01}(\tau)} {\varTheta_{00}(\tau) + \varTheta_{01}(\tau)} \\ &\stackrel{(1)}{=} \frac{\varTheta_{10}(4\tau)}{\varTheta_{00}(4\tau)} \end{align}$$ So it remains to prove Ramanujan's formula $(*)$.

Two proofs are given from page 14 onwards in

  1. [ABBW85] C. Adiga, B. C. Berndt, S. Bhargava, G. N. Watson (1985): Chapter 16 of Ramanujan’s Second Notebook: Theta-Functions and $q$-Series. In: Memoirs of the American Mathematical Society, volume 53, number 315, ISSN 0065-9266. Note: Based partially upon notes left by G. N. Watson upon his death.

I will sketch their first proof here because it uses general tools. Its downside is that it requires not only $|q|<1$ but also $|a|<1$ to avoid convergence issues with the tools involved, but our application with $a=q_2$ fulfills that requirement, and when we focus on the formal power series aspects, that restriction becomes immaterial anyway.

The first tool of [ABBW85] is Heine's basic hypergeometric series $${}_2\phi_1(\alpha,\beta;\gamma;q;z) = \sum_{n=0}^\infty \frac{(\alpha;q)_n\,(\beta;q)_n}{(\gamma;q)_n\,(q;q)_n}\,z^n$$ for which we know a continued fraction expansion $$\begin{align} \frac{{}_2\phi_1(\alpha,\beta q;\gamma q;q;z)} {{}_2\phi_1(\alpha,\beta;\gamma;q;z)} &= \cfrac{1}{1+\cfrac{a_1}{1+\cfrac{a_2}{1+\cfrac{a_3}{1+\cdots}}}} \\ \text{where}\quad a_{2k+1} &= -z\beta q^k\,\frac{(1-\alpha q^k)(1-\frac{\gamma}{\beta}q^k)} {(1-\gamma q^{2k})(1-\gamma q^{2k+1})} && (k\geq0) \\ a_{2k} &= -z\alpha q^{k-1}\,\frac{(1-\beta q^k)(1-\frac{\gamma}{\alpha}q^k)} {(1-\gamma q^{2k-1})(1-\gamma q^{2k})} && (k\geq1) \end{align}$$ Replace $q$ with $q^2$, then substitute $(\alpha,\beta,\gamma,z) = (-\frac{b}{a}q,-\frac{b}{a},q,a^2)$. This yields $$\begin{align} a_k = q^{k-1}\,\frac{(a+bq^k)(aq^k+b)}{(1-q^{2k-1})(1-q^{2k+1})} && (k\geq1) \end{align}$$ and consequently, after moving denominators of the $a_k$ with equivalence transformations, $$\small\frac{a+b}{1-q}\, \dfrac{{}_2\phi_1\!\left(-\frac{b}{a}q,-\frac{b}{a}q^2;q^3;q^2;a^2\right)} {{}_2\phi_1\!\left(-\frac{b}{a}q,-\frac{b}{a};q;q^2;a^2\right)} = \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}}}}$$ So the continued fraction in $(*)$ is a Heine continued fraction. Now let us look at the related basic hypergeometric series. This is where [ABBW85] need $|a|<1$. Define $$\begin{align} A := \frac{a+b}{1-q}\, {}_2\phi_1\!\left(-\frac{b}{a}q,-\frac{b}{a}q^2;q^3;q^2;a^2\right) &= \frac{a+b}{1-q}\sum_{n=0}^\infty \frac{\bigl(-\frac{b}{a}q;q^2\bigr)_n \bigl(-\frac{b}{a}q^2;q^2\bigr)_n} {(q^3;q^2)_n\,(q^2;q^2)_n}\,a^{2n} \\ &= \frac{a+b}{1-q}\sum_{n=0}^\infty \frac{\bigl(-\frac{b}{a}q;q\bigr)_{2n}}{(q^2;q)_{2n}}\,a^{2n} \\ &= \sum_{n=0}^\infty \frac{\bigl(-\frac{b}{a};q\bigr)_{2n+1}}{(q;q)_{2n+1}}\,a^{2n+1} \\ B := {}_2\phi_1\!\left(-\frac{b}{a}q,-\frac{b}{a};q;q^2;a^2\right) &= \sum_{n=0}^\infty \frac{\bigl(-\frac{b}{a}q;q^2\bigr)_n \bigl(-\frac{b}{a};q^2\bigr)_n} {(q;q^2)_n\,(q^2;q^2)_n}\,a^{2n} \\ &= \sum_{n=0}^\infty \frac{\bigl(-\frac{b}{a};q\bigr)_{2n}}{(q;q)_{2n}}\,a^{2n} \end{align}$$ In other words, $A$ and $B$ are the odd and even parts (in $a$) of the series $$\sum_{n=0}^\infty\frac{\bigl(-\frac{b}{a};q\bigr)_n}{(q;q)_n}\,a^n = \frac{(-b;q)_\infty}{(a;q)_\infty}$$ This last identity is due to the $q$-binomial theorem.

Therefore we can write $$\begin{align} 2A &= \frac{(-b;q)_\infty}{(a;q)_\infty} - \frac{(b;q)_\infty}{(-a;q)_\infty} \\ 2B &= \frac{(-b;q)_\infty}{(a;q)_\infty} + \frac{(b;q)_\infty}{(-a;q)_\infty} \\\therefore\quad \frac{A}{B} &= \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} \end{align}$$ And $A/B$ is our continued fraction. Note that the ratio $-\frac{b}{a}$ used in the series representation is kept when changing the sign of $a$, so the sign of $b$ has to change as well.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .