Abstract
The form $D=(k)^2+1$, $k\in\mathbb{Z}^+$ is known to generate all positive non square integers $D$ having a continued fraction expansion $\sqrt{D}=[a_0;\overline{2a_0}]$. Another known form that generate all positive non square integers $D$ for the expansion of $\sqrt{D}=[a_0;\overline{a_1,a_1,2a_0}]$ is $D=(k\cdot a_1^2+k+\frac{a_1}{2})^2+2k\cdot a_1+1$, with $a_1$ and $k\in\mathbb{Z}^+$, 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 non square integers $D$ for any given period $\ell=2n+1$ or $\ell=2n$, $D$ and $n\in\mathbb{Z}^+$, will be provided. It will be shown that the partial quotients $a_i$ ($00$ the period is always primitive. A study of all the sequences of continued fraction expansions of length $\ell$ where $a_n$ is incremented and the other partial quotients $a_i$ are fixed will be done, highlighting their cyclic nature.