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.

A031409 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 6.

This page as a plain text file.
%I A031409 #16 Feb 04 2023 13:26:14
%S A031409 38,46,54,62,84,93,111,129,141,148,164,172,188,204,212,230,236,244,
%T A031409 245,252,270,295,305,330,345,355,395,426,448,469,474,497,518,553,570,
%U A031409 581,584,602,609,616,632,644,648,658,712,721,738,742,749,763,765,777,801
%N A031409 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 6.
%H A031409 T. D. Noe, <a href="/A031409/b031409.txt">Table of n, a(n) for n = 1..1000</a>
%t A031409 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]] == 6, AppendTo[t, n]]]]; t (* _T. D. Noe_, Apr 04 2014 *)
%t A031409 cf6Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1},ContinuedFraction[s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]]==6]; Select[Range[1000],cf6Q] (* _Harvey P. Dale_, Feb 04 2023 *)
%Y A031409 Cf. A031404-A031423.
%K A031409 nonn
%O A031409 1,1
%A A031409 _David W. Wilson_