The RogersRamanujan continued fraction is a generalized continued fraction defined by
(1)

(Rogers 1894, Ramanujan 1957, Berndt et al. 1996, 1999, 2000). It was discovered by Rogers (1894), independently by Ramanujan around 1913, and again independently by Schur in 1917. Modulo the factor of added for convenience, it provides a geometric series qanalog of the golden ratio
(2)

The convergents of are given by
(3)
 
(4)
 
(5)
 
(6)
 
(7)
 
(8)

(OEIS A128915 and A127836; Sills 2003, p. 25, identity 314).
The fraction can be expressed in closed form in terms of qseries by
(9)
 
(10)
 
(11)

and in terms of the Ramanujan theta function
(12)

by
(13)

In the upper halfplane and modulo branch cuts, it can also be expressed exactly in terms of the Dedekind eta function by
(14)

where
(15)

(Trott 2004).
The coefficients of in the Maclaurin series of for , 1, 2, ... are 1, , 1, 0, , 1, , 1, 0, , 2, , ... (OEIS A007325).
The fraction converges quickly for points sufficiently far from the unit circle in the complex plane. For values , the series converges to a unique value, while for , it converges to two possible values. The value of the th convergent of the continued fraction can be expressed in terms of the unique value inside the unit disk as
(16)

(Andrews et al. 1992, Trott 2004).
Amazingly, Ramanujan showed that is an algebraic number for all positive rational . Special cases include
(17)
 
(18)
 
(19)

where is the root of near 0.51142.... can be written as
(20)

(Yi 2001, Trott 2004). The values of have been computed by Trott for all values of , and the algebraic degrees of , , ... are 8, 4, 32, 8, 40, 16, 64, 16, 96, 20, ... (OEIS A082682; Trott 2004).
satisfies the amazing equalities
(21)
 
(22)

where is a qPochhammer symbol. It also satisfies
(23)
 
(24)

(Watson 1929ab; Berndt 1991, pp. 265267; Berndt et al. 1996, 2000; Son 1998).
Defining
(25)
 
(26)
 
(27)
 
(28)

these quantities satisfy the modular equations
(29)
 
(30)
 
(31)
 
(32)
 
(33)
 
(34)
 
(35)
 
(36)

(Berndt et al. 1996, 2000). Trott (2004) gives modular equations of orders 2 to 15 and the primes 17, 19, and 23.
As discussed by Hardy (Ramanujan 1962, pp. xxvii and xxviii), Berndt and Rankin (1995), and Berndt et al. (1996, 2000), Ramanujan also defined the generalized continued fraction
(37)

Ramanujan also considered the continued fraction
(38)
 
(39)

(Berndt 1991, p. 30; Berndt et al. 1996, 2000), of which the special case is plotted above.
Terminating at a term gives
(40)

(Berndt et al. 1996, 2000).
The real roots of are 0.576149, 0.815600, 0.882493, 0.913806, 0.931949, 0.943785, 0.952125, ..., the smallest of which was found by Ramanujan (Berndt et al. ). and its smallest positive root are related to the enumeration of coins in a fountain (Berndt 1991, Berndt et al. 1996, 2000) and the study of birth and death processes (Berndt et al. 1996, 2000; Parthasarathy et al. 1998). In general, the least positive root of is given as by
(41)

(OEIS A050203; Berndt et al. 1996, 2000). Ramanujan gave the amazing approximations
(42)
 
(43)

For , these approximations give
(44)
 
(45)

More generally, for the broad class of defined as , can be evaluated in terms of the jfunction and the icosahedral equation as
(46)

with one of the as (Duke 2004). As an example, has , so . Substituting into the equation, one of its factors will be a quartic with the root .
Furthermore, the numerator and the denominator (with a constant) can be combined to form a perfect square,
(47)

which are in fact polynomial invariants of the icosahedral group.