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!)
A031509 Numbers k such that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 11. 2

%I #20 Aug 19 2021 23:27:59

%S 123,127,131,139,151,163,167,488,512,520,544,608,640,672,1095,1167,

%T 1383,1455,1515,1944,2008,2136,2264,2456,2648,2696,3035,3115,3215,

%U 3235,3415,3515,3635,3715,3735,3835,3935,4115,4135,4215,4368,4944,5496,5943,5971

%N Numbers k such that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 11.

%H Robert Israel, <a href="/A031509/b031509.txt">Table of n, a(n) for n = 1..1000</a>

%e The c.f. expansion of sqrt(127) is 11, [3, 1, 2, 2, 7, 11, 7, 2, 2, 1, 3, 22], [3, 1, 2, 2, 7, 11, 7, 2, 2, 1, 3, 22], ... If the 22 is deleted from the periodic part the central term is 11. - _N. J. A. Sloane_, Aug 17 2021

%p # Maple 2016 or later.

%p filter:= proc(n) uses NumberTheory; local R;

%p if issqr(n) then return false fi;

%p R:= Term(ContinuedFraction(sqrt(n)),periodic)[2];

%p nops(R)::even and R[nops(R)/2] = 11

%p end proc:

%p select(filter, [$2..10000]); # _Robert Israel_, Jun 07 2019

%t okQ[k_] := Module[{c, lc}, If[IntegerQ[Sqrt[k]], False,

%t c = ContinuedFraction[Sqrt[k]]; lc = Length[c[[2]]];

%t EvenQ[lc] && c[[2, lc/2]] == 11]];

%t Select[Range[10000], okQ] (* _Jean-François Alcover_, Jul 09 2021 *)

%K nonn

%O 1,1

%A _David W. Wilson_

%E Definitions of A031509-A031598 clarified by _N. J. A. Sloane_, Aug 17 2021

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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)