A010342 Numbers k such that all terms in the periodic part of the continued fraction for sqrt(k) except the final term are 1.
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
Keywords
Examples
(2q-1)/(b-1) = 1/1 so b=2q. Let q=1, b=2; k = q^2 + b = 3.
Links
- Kevin Ryde, Table of n, a(n) for n = 1..6000
- Kevin Ryde, PARI/GP Code and Notes
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
Comments