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.

A146328 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 3.

Original entry on oeis.org

17, 37, 61, 65, 101, 145, 185, 197, 257, 317, 325, 401, 461, 485, 557, 577, 677, 773, 785, 901, 985, 1025, 1129, 1157, 1297, 1429, 1445, 1601, 1765, 1877, 1901, 1937, 2117, 2285, 2305, 2501, 2705, 2873, 2917, 3077, 3137, 3281, 3293, 3341, 3365, 3601, 3845, 4045, 4097, 4357, 4597, 4625, 4901
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146348.

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    okQ[n_] := Module[{cf = ContinuedFraction[(1 + Sqrt[n])/2]}, Length[cf] > 1 && Length[cf[[2]]] == 3]; Select[Range[5000], okQ]

Extensions

803 removed by R. J. Mathar, Sep 06 2009
Extended by T. D. Noe, Mar 09 2011