login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A031557 Numbers n such that continued fraction for sqrt(n) has even period and central term 59. 1
3483, 3491, 3499, 3511, 3527, 3539, 3547, 3559, 3571, 3579, 3583, 3587, 3607, 3623, 3631, 3643, 3647, 3651, 3659, 3667, 3671, 3691, 3699, 3707, 3719, 13928, 13952, 13960, 13984, 14016, 14080, 14120, 14152, 14176, 14208, 14216, 14240, 14248, 14304 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

MATHEMATICA

cfep59Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; EvenQ[len]&&cf[[len/2]] == 59]; Select[Range[15000], cfep59Q] (* Harvey P. Dale, Feb 18 2016 *)

PROG

(Python)

from __future__ import division

from sympy import continued_fraction_periodic

A031557_list = [n for n, s in ((i, continued_fraction_periodic(0, 1, i)[-1]) for i in range(1, 10**5)) if isinstance(s, list) and len(s) % 2 == 0 and s[len(s)//2-1] == 59] # Chai Wah Wu, Jun 08 2017

CROSSREFS

Sequence in context: A176380 A156773 A174753 * A031737 A268156 A180994

Adjacent sequences:  A031554 A031555 A031556 * A031558 A031559 A031560

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 13 12:44 EDT 2021. Contains 344996 sequences. (Running on oeis4.)