OFFSET
0,1
LINKS
MAPLE
Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'):
MATHEMATICA
Block[{$MaxExtraPrecision=1000}, ContinuedFraction[Sqrt[150], 300]] (* Vladimir Joseph Stephan Orlovsky, Mar 13 2011*) (* Program modified by Harvey P. Dale, Feb 16 2025 *)
PadRight[{12}, 120, {24, 4}] (* Harvey P. Dale, Feb 16 2025 *)
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][(n-1)%2]
print([a(n) for n in range(74)]) # Michael S. Branicky, Dec 04 2021
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
STATUS
approved