|
|
A040134
|
|
Continued fraction for sqrt(147).
|
|
0
|
|
|
12, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8, 24, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
MAPLE
|
Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'):
|
|
MATHEMATICA
|
LinearRecurrence[{0, 1}, {12, 8, 24}, 80] (* or *) PadRight[{12}, 80, {24, 8}] (* Harvey P. Dale, Jun 11 2017 *)
|
|
PROG
|
(Python)
from sympy import sqrt
from sympy.ntheory.continued_fraction import continued_fraction_iterator
def aupton(nn):
gen = continued_fraction_iterator(sqrt(147))
return [next(gen) for i in range(nn+1)]
(Python) # second version based on recurrence
def a(n): return 12 if n == 0 else [8, 24][(n-1)%2]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,cofr,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|