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.

A010342 Numbers k such that all terms in the periodic part of the continued fraction for sqrt(k) except the final term are 1.

Original entry on oeis.org

3, 7, 8, 13, 15, 24, 32, 35, 48, 58, 63, 74, 75, 80, 99, 120, 135, 136, 143, 168, 185, 195, 215, 224, 255, 288, 312, 323, 346, 360, 399, 425, 427, 440, 483, 528, 557, 560, 575, 624, 675, 711, 728, 783, 818, 819, 840, 880, 899, 960
Offset: 1

Views

Author

N. J. A. Sloane, Walter Gilbert

Keywords

Comments

Theorem: If (b-1)/(2q-1) = F(m)/F(m+1) then sqrt(q^2+b) = [q;1,1,...,1,1,2q,...], where F(m) are the Fibonacci numbers and the period contains m ones. - Thomas Ordowski, Jun 09 2012
Terms are all and only k = ((d*F(m+1) + 1)/2)^2 + d*F(m) + 1 for d>=1 odd, and m>=1 with m == 0 or 1 (mod 3) (so F(m+1) odd), and consequently lim_{n->oo} n/sqrt(a(n)) = A360957 - 1 = 1.696383... - Kevin Ryde, Mar 07 2023

Examples

			(2q-1)/(b-1) = 1/1 so b=2q. Let q=1, b=2; k = q^2 + b = 3.
		

Crossrefs

Cf. A000045 (Fibonacci).

Programs

  • Mathematica
    fQ[n_] := Union@ Most@ Last@ ContinuedFraction@ Sqrt[1/n] == {1}; Select[ Range@ 1000, fQ] (* Robert G. Wilson v, Jun 07 2012 *)

Formula

sqrt(k) = [q;1,1,...,1,1,2q,...] = sqrt(q^2+b), where (2q-1)/(b-1) = F(m+1)/F(m) for m=1,3,4,6,7,9,10,12,13,... The period contains m ones. F(m) is the m-th Fibonacci number. Note that this formula does not generate all terms of this sequence. - Thomas Ordowski, Jun 08 2012
sqrt(k) = [q;1,1,...,1,1,2q,...] with m ones in its repeating continued fraction expansion precisely when q=floor(sqrt(k)) and k=q^2+2q*F(m)/F(m+1)+F(m-1)/F(m+1). Such k are integral precisely when 2q-1 is divisible by F(m+1). - Gary Walsh, Jan 06 2023