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!)
A031423 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 10. 20

%I #33 Sep 16 2021 14:54:33

%S 701,1418,1493,2197,2290,3257,4793,6154,6466,8389,8753,9577,9965,

%T 10765,11257,11677,12541,14218,14929,15413,15658,16001,16501,17009,

%U 17786,18049,18314,18581,19121,21577,22157,22745,24557,24677,25805,26561,27530,28517

%N 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 10.

%H Chai Wah Wu, <a href="/A031423/b031423.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe and Georg Fischer)

%t 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]] == 10 && c[[2, (len + 1)/2 - 1]] == 10, AppendTo[t, n]]]]; t (* _T. D. Noe_, Apr 04 2014; corrected by _Georg Fischer_, Jun 23 2019 *)

%o (Python)

%o from sympy.ntheory.continued_fraction import continued_fraction_periodic

%o A031423_list = []

%o for n in range(1,10**4):

%o cf = continued_fraction_periodic(0,1,n)

%o if len(cf) > 1 and len(cf[1]) > 1 and len(cf[1]) % 2 and cf[1][len(cf[1])//2] == 10:

%o A031423_list.append(n) # _Chai Wah Wu_, Sep 16 2021

%Y Cf. A031404-A031422.

%Y Subsequence of A003814.

%K nonn

%O 1,1

%A _David W. Wilson_

%E a(1) corrected by _T. D. Noe_, Apr 04 2014

%E a(1) = 26 removed by _Georg Fischer_, Jun 23 2019

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 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)