Abstract
The form D=(k)^2+1 is known to generate all positive non square integers D having a continued fraction expansion D^(1/2)=[a_0;2a_0]. Another known form that generate all positive non square integers D for the expansion of D^(1/2)=[a_0;a_1,a_1,2a_0] is D=(k*a_1^2+k+a_1/2)^2+2k*a_1+1, and already we see that a_1 is restricted to even values for an integer solution D to exist, and when k=0, the period is not primitive/the shortest.
In this paper, a form that generate all D for any given period will be provided. It will be shown that the partial quotients a_i can be given any positive value for a solution to exist, and that the only restriction, if any, is on the parity of the central quotient a_n. When k=0, the period is sometimes not primitive and in three scenarios, it is never primitive. It will also be shown that for k positive, the period is always primitive.
A study of all the sequences of continued fraction expansions where a_n is incremented and the other partial quotients a_i are fixed will be done, highlighting their cyclic nature.