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.
%I A146328 #22 Mar 31 2020 03:04:44 %S A146328 17,37,61,65,101,145,185,197,257,317,325,401,461,485,557,577,677,773, %T A146328 785,901,985,1025,1129,1157,1297,1429,1445,1601,1765,1877,1901,1937, %U A146328 2117,2285,2305,2501,2705,2873,2917,3077,3137,3281,3293,3341,3365,3601,3845,4045,4097,4357,4597,4625,4901 %N A146328 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 3. %C A146328 For primes in this sequence see A146348. %H A146328 Amiram Eldar, <a href="/A146328/b146328.txt">Table of n, a(n) for n = 1..10000</a> %e A146328 a(1) = 3 because continued fraction of (1+sqrt(17))/2 = 2, 1, 1, 3, 1, 1, 3, ... has period (1,1,3) length 3. %p A146328 A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146328 := proc(n) RETURN(A146326(n) = 3) ; end: for n from 2 to 1801 do if isA146328(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Sep 06 2009 %t A146328 okQ[n_] := Module[{cf = ContinuedFraction[(1 + Sqrt[n])/2]}, Length[cf] > 1 && Length[cf[[2]]] == 3]; Select[Range[5000], okQ] %Y A146328 Cf. A000290, A078370, A146326-A146345, A146348-A146360. %K A146328 nonn %O A146328 1,1 %A A146328 _Artur Jasinski_, Oct 30 2008 %E A146328 803 removed by _R. J. Mathar_, Sep 06 2009 %E A146328 Extended by _T. D. Noe_, Mar 09 2011