

A040137


Continued fraction for sqrt(150).


0



12, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4, 24, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


LINKS

Table of n, a(n) for n=0..73.
Index entries for continued fractions for constants
Index entries for linear recurrences with constant coefficients, signature (0,1).


FORMULA

a(n) = 14+10*(1)^n12*[C(2*n,n) mod 2], with n>=0. [Paolo P. Lava, Jun 10 2009]


MAPLE

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


MATHEMATICA

ContinuedFraction[Sqrt[150], 300] (* Vladimir Joseph Stephan Orlovsky, Mar 13 2011*)


PROG

(Python)
from sympy import sqrt
from sympy.ntheory.continued_fraction import continued_fraction_iterator
def aupton(nn):
gen = continued_fraction_iterator(sqrt(150))
return [next(gen) for i in range(nn+1)]
print(aupton(73)) # Michael S. Branicky, Dec 04 2021
(Python) # second version based on recurrence
def a(n): return 12 if n == 0 else [4, 24][(n1)%2]
print([a(n) for n in range(74)]) # Michael S. Branicky, Dec 04 2021


CROSSREFS

Sequence in context: A339467 A199693 A166206 * A092237 A081987 A327972
Adjacent sequences: A040134 A040135 A040136 * A040138 A040139 A040140


KEYWORD

nonn,cofr,easy


AUTHOR

N. J. A. Sloane.


STATUS

approved



