login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010202 Continued fraction for sqrt(149). 1
12, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1, 5, 3, 3, 5, 1, 4, 24, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
G. Xiao, Contfrac
MATHEMATICA
ContinuedFraction[Sqrt[149], 300] (* Vladimir Joseph Stephan Orlovsky, Mar 13 2011 *)
PadRight[{12}, 120, {24, 4, 1, 5, 3, 3, 5, 1, 4}] (* Harvey P. Dale, Apr 04 2020 *)
PROG
(Magma) SetDefaultRealField(RealField(120)); ContinuedFraction(Sqrt(149)); // Vincenzo Librandi, Apr 10 2020
(Python)
from sympy import sqrt
from sympy.ntheory.continued_fraction import continued_fraction_iterator
def aupton(nn):
gen = continued_fraction_iterator(sqrt(149))
return [next(gen) for i in range(nn+1)]
print(aupton(83)) # Michael S. Branicky, Dec 04 2021
(Python) # second version based on recurrence
def a(n): return 12 if n == 0 else [4, 1, 5, 3, 3, 5, 1, 4, 24][(n-1)%9]
print([a(n) for n in range(84)]) # Michael S. Branicky, Dec 04 2021
CROSSREFS
Sequence in context: A038329 A098909 A261403 * A079792 A079791 A018812
KEYWORD
nonn,cofr
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:04 EDT 2024. Contains 371906 sequences. (Running on oeis4.)