%I #67 Mar 07 2023 07:41:35
%S 3,7,8,13,15,24,32,35,48,58,63,74,75,80,99,120,135,136,143,168,185,
%T 195,215,224,255,288,312,323,346,360,399,425,427,440,483,528,557,560,
%U 575,624,675,711,728,783,818,819,840,880,899,960
%N Numbers k such that all terms in the periodic part of the continued fraction for sqrt(k) except the final term are 1.
%C 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
%C 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
%H Kevin Ryde, <a href="/A010342/b010342.txt">Table of n, a(n) for n = 1..6000</a>
%H Kevin Ryde, <a href="/A010342/a010342.gp.txt">PARI/GP Code and Notes</a>
%F 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
%F 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
%e (2q-1)/(b-1) = 1/1 so b=2q. Let q=1, b=2; k = q^2 + b = 3.
%t fQ[n_] := Union@ Most@ Last@ ContinuedFraction@ Sqrt[1/n] == {1}; Select[ Range@ 1000, fQ] (* _Robert G. Wilson v_, Jun 07 2012 *)
%Y Cf. A000045 (Fibonacci).
%K nonn
%O 1,1
%A _N. J. A. Sloane_, Walter Gilbert