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!)
A010187 Continued fraction for sqrt(126). 1
11, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4, 22, 4, 2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
G. Xiao, Contfrac
MATHEMATICA
ContinuedFraction[Sqrt[126], 300] (* Vladimir Joseph Stephan Orlovsky, Mar 12 2011 *)
PROG
(Python)
from sympy import sqrt
from sympy.ntheory.continued_fraction import continued_fraction_iterator
def aupton(nn):
gen = continued_fraction_iterator(sqrt(126))
return [next(gen) for i in range(nn+1)]
print(aupton(71)) # Michael S. Branicky, Nov 04 2021
(Python) # second version based on linear recurrence
def a(n): return 11 if n == 0 else [4, 2, 4, 22][(n-1)%4]
print([a(n) for n in range(72)]) # Michael S. Branicky, Nov 04 2021
CROSSREFS
Sequence in context: A110782 A088073 A352162 * A248175 A114267 A166205
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 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)