|
|
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
|
|
|
MATHEMATICA
|
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)]
(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]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,cofr
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|