OFFSET
0,1
REFERENCES
Harold Davenport, The Higher Arithmetic, Cambridge University Press, 8th ed., 2008, p. 97.
James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..20000
G. Xiao, Contfrac
Index entries for linear recurrences with constant coefficients, signature (0,1).
FORMULA
From Stefano Spezia, Jul 27 2025: (Start)
a(n) = 3*A040005(n).
G.f.: 3*(2 + x + 2*x^2)/(1 - x^2). (End)
EXAMPLE
6.3245553203367586639977870... = 6 + 1/(3 + 1/(12 + 1/(3 + 1/(12 + ...)))). - Harry J. Smith, Jun 05 2009
MAPLE
Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'):
MATHEMATICA
ContinuedFraction[Sqrt[40], 300] (* Vladimir Joseph Stephan Orlovsky, Mar 06 2011 *)
LinearRecurrence[{0, 1}, {6, 3, 12}, 100] (* or *) PadRight[{6}, 100, {12, 3}] (* Harvey P. Dale, Mar 03 2018 *)
PROG
(PARI) { allocatemem(932245000); default(realprecision, 32000); x=contfrac(sqrt(40)); for (n=0, 20000, write("b040033.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 05 2009
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
STATUS
approved
