cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A031416 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 3.

This page as a plain text file.
%I A031416 #20 Aug 18 2021 00:33:16
%S A031416 89,149,193,218,250,277,337,493,521,569,653,709,914,1009,1018,1037,
%T A031416 1385,1465,1553,1597,1618,1754,1781,1898,1921,1973,1994,2069,2129,
%U A031416 2146,2293,2378,2389,2441,2474,2561,2725,2741,2777,2897,2957,2986,3170,3229,3265
%N A031416 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 3.
%H A031416 T. D. Noe, <a href="/A031416/b031416.txt">Table of n, a(n) for n = 1..1000</a>
%t A031416 n = 1; t = {}; While[Length[t] < 60, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && c[[2, (len + 1)/2]] == 3, AppendTo[t, n]]]]; t (* _T. D. Noe_, Apr 03 2014 *)
%t A031416 cfo3Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{0,0}, ContinuedFraction[ s ][[2]]];len=Length[cf];OddQ[len]&&cf[[ (len+1)/2]] == cf[[(len-1)/2]]==3]; Select[Range[3300],cfo3Q] (* _Harvey P. Dale_, Sep 25 2019 *)
%Y A031416 Cf. A031404-A031423.
%Y A031416 Subsequence of A003814.
%K A031416 nonn
%O A031416 1,1
%A A031416 _David W. Wilson_
%E A031416 Initial 10 removed by _T. D. Noe_, Apr 03 2014