|m=||Floor(Sqrt(m))||Period of Continued Fraction for Sqrt(m)|
Example: Row 2 with n=2: the continued fraction expansion for the square root of 130 is [11,2,2,22,2,2,22,2,2,22,...].
Unlike the "all 1's" case, we can find an infinite family of integers m with the palindromic part of the period in the continued fraction expansion of the square root of m consisting of ANY number, k, of 2's. We prefer, however, to write two formulas for m: one if k is even:
|m = Pk+12 n2 + 2 ( Pk+1 + Pk) n + 2|
and one when k is odd:
|m = (Pk+12/4) n2 + ( Pk+1 + Pk) n + 2|
where Pk is the k-th Pell number. See also Sloane's A000129.