login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A040013 Continued fraction for sqrt(18). 2
4, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Harry J. Smith, Table of n, a(n) for n = 0..20000

G. Xiao, Contfrac

Index entries for continued fractions for constants

Index entries for linear recurrences with constant coefficients, signature (0, 1).

FORMULA

a(n) = 6 + 2*(-1)^n - 4*(binomial(2*n,n) mod 2), with n>=0. - Paolo P. Lava, Mar 03 2008

EXAMPLE

4.242640687119285146405066172... = 4 + 1/(4 + 1/(8 + 1/(4 + 1/(8 + ...)))). - Harry J. Smith, Jun 03 2009

MAPLE

Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'):

P:=proc(n) local i; for i from 0 by 1 to n do print(6+2*(-1)^i-4*(binomial(2*i, i) mod 2)); od; end: P(100); # Paolo P. Lava, Mar 03 2008

MATHEMATICA

ContinuedFraction[Sqrt[18], 300] (* Vladimir Joseph Stephan Orlovsky, Mar 05 2011 *)

PROG

(PARI) { allocatemem(932245000); default(realprecision, 31000); x=contfrac(sqrt(18)); for (n=0, 20000, write("b040013.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 03 2009

CROSSREFS

Cf. A010474 Decimal expansion. - Harry J. Smith, Jun 03 2009

Sequence in context: A176295 A140874 A021227 * A153132 A167275 A273333

Adjacent sequences:  A040010 A040011 A040012 * A040014 A040015 A040016

KEYWORD

nonn,cofr,easy

AUTHOR

N. J. A. Sloane

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 21:25 EDT 2019. Contains 325144 sequences. (Running on oeis4.)