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.

A031407 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 4.

This page as a plain text file.
%I A031407 #14 Aug 18 2021 00:13:50
%S A031407 18,22,34,39,57,68,69,76,78,92,105,108,116,124,140,150,155,174,186,
%T A031407 203,205,217,220,259,264,266,282,294,301,308,318,329,333,369,371,376,
%U A031407 378,406,410,413,423,434,450,456,477,490,495,504,517,522,549,550,558
%N A031407 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 4.
%H A031407 T. D. Noe, <a href="/A031407/b031407.txt">Table of n, a(n) for n = 1..1000</a>
%t A031407 n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 4, AppendTo[t, n]]]]; t (* _T. D. Noe_, Apr 04 2014 *)
%Y A031407 Cf. A031404-A031423.
%K A031407 nonn
%O A031407 1,1
%A A031407 _David W. Wilson_