%I #16 Aug 18 2021 12:01:09
%S 7,2,23,5,47,10,79,17,119,26,167,37,223,50,287,65,359,82,439,101,527,
%T 122,623,145,727,170,839,197,959,226,1087,257,1223,290,1367,325,1519,
%U 362,1679,401,1847,442,2023,485,2207,530,2399,577,2599,626,2807,677,3023,730
%N a(n) is the smallest nonsquare m such that the second partial quotient in the continued fraction for sqrt(m) equals n.
%H Max Alekseyev, <a href="/A338284/b338284.txt">Table of n, a(n) for n = 1..100</a>
%F For even n, a(n) = A013945(n) = A002522(n/2) = (n/2)^2 + 1.
%F For odd n, a(n) = A073577((n+1)/2) = n^2 + 4*n + 2.
%F O.g.f.: (7 + 2*x + 2*x^2 - x^3 - x^4 + x^5) / ((1-x)^3 * (1+x)^3).
%e a(3) = 23, since sqrt(23) = [4; 1, 3, ...] and m=23 is the smallest integer such that sqrt(m) has with second partial quotient equal 3.
%t CoefficientList[Series[(7 + 2*x + 2*x^2 - x^3 - x^4 + x^5) / ((1-x)^3 * (1+x)^3),{x,0,20}], x] (* _Georg Fischer_, Aug 18 2021 *)
%Y Interweaving of A073577 and A002522.
%Y Cf. A013945 (first partial quotient = n).
%K nonn,easy
%O 1,1
%A _Max Alekseyev_, Oct 20 2020