Ramanujan Continued Fractions

Author

Eric W. Weisstein
February 9, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/RamanujanContinuedFractions.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RamanujanContinuedFractions.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

FromGeneralContinuedFraction[{a0_,l_List?MatrixQ}]:=a0+Fold[#2[[1]]/(#1+#2[[2]])&,0,Reverse[l]]/;Dimensions[l][[2]]===2

<<Utilities`Typesetting`

Integrals

4(∫_0^∞)((x (e^(-x (Sqrt[5]))))/(coshx))dx

i=4Integrate[((x Exp[-x (Sqrt[5])])/(Cosh[x])),{x,0,∞}]//FullSimplify

N[i,20]

FullSimplify[(1/2)(Zeta[2,(1/4)(1+Sqrt[5])]-Zeta[2,(1/4)(3+Sqrt[5])])]

N[FromGeneralContinuedFraction[{0,Prepend[Flatten[{{#,1},{#,1}}&/@Range[10^4]^2,1],{1,1}]}],20]//Timing

2 (∫_0^∞)(((x^2) (e^(-x (Sqrt[3]))))/(sinhx))dx

i2=2Integrate[(((x^2)Exp[-x (Sqrt[3])])/(Sinh[x])),{x,0,∞}]

FullSimplify[i2]

N[i2,20]

N[FromGeneralContinuedFraction[{0,Prepend[Flatten[Table[{{n^3,1},{n^3,2n+1}},{n,5000}],1],{1,1}]}],20]//Timing

Almost Integers

(e^(-2n π)) #1

FromGeneralContinuedFraction[{0,Table[{Exp[-2n π],1},{n,0,5}]}]//TraditionalForm

N[((Sqrt[((5+(Sqrt[5]))/2)])-(((Sqrt[5])+1)/2))(E^(2π/5)),20]

FullSimplify[1/((E^(-2 π/5))/((5^(1/4)) (Sqrt[ϕ])-ϕ))]//TraditionalForm

N[FromGeneralContinuedFraction[{0,Table[{Exp[-2n π],1},{n,0,50}]}],20]

(e^(-2n π)) #2

FromGeneralContinuedFraction[{1,Table[{Exp[-2n π],1},{n,5}]}]//TraditionalForm

N[FromGeneralContinuedFraction[{1,Table[{Exp[-2n π],1},{n,1,20}]}],20]

TraditionalForm[c=(1/(((Sqrt[GoldenRatio Sqrt[5]])-GoldenRatio)Exp[2Pi/5]))]

FullSimplify[FunctionExpand[c]]

N[c,20]

(e^(-2n π(Sqrt[5]))) #1

FromGeneralContinuedFraction[{0,Table[{Exp[-2n π (Sqrt[5])],1},{n,0,5}]}]//TraditionalForm

N[(((Sqrt[5])/(1+((((5^(3/4))((((((Sqrt[5])-1)/2)))^(5/2))-1))^(1/5))))-(((Sqrt[5])+1)/2))(E^(2π/(Sqrt[5]))),20]

TraditionalForm[c=(((Sqrt[5])/(1+((((5^(3/4))(((GoldenRatio-1))^(5/2))-1))^(1/5))))-GoldenRatio)(E^(2π/(Sqrt[5])))]

N[c,20]

N[FromGeneralContinuedFraction[{0,Table[{Exp[-2n π (Sqrt[5])],1},{n,0,20}]}],20]

(e^(-2n π(Sqrt[5]))) #2

FromGeneralContinuedFraction[{1,Table[{Exp[-2n π (Sqrt[5])],1},{n,5}]}]//TraditionalForm

N[FromGeneralContinuedFraction[{1,Table[{Exp[-2n π (Sqrt[5])],1},{n,20}]}],20]

1/0.99999920873290079312747304093371578651`20.000000000000007

TraditionalForm[c=1/((E^((2 π)/(Sqrt[5]))) (((Sqrt[5])/(1+((-1+(5^(3/4)) (((-1+ϕ))^(5/2)))^(1/5))))-ϕ))]

N[c,20]

FullSimplify[FunctionExpand[c]]