|m=||Floor(Sqrt(m))||Period of Continued Fraction for Sqrt(m)|
Example: Row 2 with n=3: the continued fraction expansion for the square root of 2640 is [51,2,1,1,1,2,102,2,1,1,1,2,102,2,1,...].
As in the "all 1's" case, the 'sum of the palindrome' must be equivalent to 0 or 1 mod 3. The formula for m is a variant of Chapman's formula for the "all 1's" case:
|m = Fk+12 (n-1)2 + ( Fk+12 - Fk+1 - 2 Fk ) (n-1) + ( [(Fk+1 - 1 )2]/4 - Fk + 1)|
The coefficients are numerically the same as before, but the sign of the linear term changes to + , and there is a shift of the input. This suggests deforming any generating quadratics and examining the periods of the square roots of their values at the integers.