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!)
A288185 Least even number k such that the continued fraction for sqrt(k) has period n. 2
2, 6, 130, 14, 74, 22, 58, 44, 106, 86, 298, 46, 746, 134, 1066, 94, 1018, 424, 922, 268, 394, 166, 586, 382, 1306, 214, 1354, 334, 1642, 436, 2122, 508, 1114, 454, 4138, 478, 3194, 1108, 4874, 526, 3418, 724, 2458, 604, 9914, 694, 4618, 844, 2746, 1318 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Periodic Continued Fraction
FORMULA
A003285(a(n)) = n, A000035(a(n)) = 0.
EXAMPLE
a(2) = 6, sqrt(6) = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + 1/...)))), period 2: [2, 4].
PROG
(Python)
from sympy import continued_fraction_periodic
def A288185(n):
d = 2
while True:
s = continued_fraction_periodic(0, 1, d)[-1]
if isinstance(s, list) and len(s) == n:
return d
d += 2 # Chai Wah Wu, Jun 08 2017
CROSSREFS
Sequence in context: A060001 A181316 A101753 * A359961 A274695 A156515
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 06 2017
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 July 19 04:35 EDT 2024. Contains 374388 sequences. (Running on oeis4.)