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!)
A031417 Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted then there are a pair of central terms both equal to 4. 1
274, 370, 481, 797, 953, 1069, 1249, 1313, 1378, 1381, 1514, 1657, 1658, 1733, 1889, 2125, 2297, 2377, 2554, 2557, 2833, 2834, 2929, 2941, 3226, 3329, 3338, 3433, 3541, 3761, 3874, 3989, 4093, 4106, 4441, 4442, 4561, 4682, 4685, 4933, 4937, 5197, 5450 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
The simple continued fraction for sqrt(274) = [16; 1, 1, 4, 4, 1, 1, 32, ...] with odd period 7 and central term 4. Another example is sqrt(481) = [21; 1, 13, 1, 1, 1, 4, 4, 1, 1, 1, 13, 1, 42, ...] with odd period 13 and central term 4. - Michael Somos, Apr 03 2014
MATHEMATICA
n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && c[[2, (len + 1)/2]] == 4, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 03 2014 *)
cf4Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1, 1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; OddQ[len]&&cf[[(len+1)/2]] == cf[[(len-1)/2]]==4]; Select[Range[5500], cf4Q] (* Harvey P. Dale, Jul 28 2021 *)
CROSSREFS
Subsequence of A003814.
Sequence in context: A307537 A295455 A174771 * A361797 A260289 A322254
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(1) corrected by T. D. Noe, Apr 03 2014
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 April 24 10:53 EDT 2024. Contains 371936 sequences. (Running on oeis4.)