Equation : A^2 + B^2 + 1 = C^2 + D^2 —- (Part 4) $A^2 \; + \; B^2 \; + \; 1 \; = \; C^2 \; + \; D^2$

and $(n + 1)^2 \; + \; (2 \, n)^2 \; + \; 1 \; = \; (2 \, n + 1)^2 \; + \; (n - 1)^2$

We can write $C^2 \; + \; D^2 \; - \; ( \,A^2 \; + \; B^2 \,) \; = \; 1$ $A^2 \; = \; (n + 1)^2$ $B^2 \; = \; (2 \, n)^2$ $C^2 \; = \; (2 \, n + 1)^2$ $D^2 \; = \; (n - 1)^2$ $X \; = \; A^2 \; + \; B^2$ $Y \; = \; C^2 \; + \; D^2$ $X \; = \; a \, d$ $Y \; = \; b \, c$ $b \, c \; - \; a \, d \; = \; 1$

Fibonacci’s identity $(a^2 + b^2) \,(c^2 + d^2) = (a \,c - b \,d)^2 + (a \,d + b \,c)^2 = (a \,c + b \,d)^2 + (a \,d - b \,c)^2$ $(a \, c + b \, d)^2 + (a \, d - b \, c)^2 = (a \, c - b \, d)^2 + (a \, d + b \, c)^2$

We can use this identity by letting $b \, c \; - \; a \, d \; = \; 1$

For example, $13^2 \; + \; 24^2 \; + \; 1 \; = \; 11^2 \; + \; 25^2 \; = \; 746$  $(2\times 149 \; + \; 5\times 373)^2 \; + \; (2\times 373 \; - \; 5\times 149)^2$ $= \; (2\times 149 \; - \; 5\times 373)^2 \; + \; (2\times 373 \; + \; 5\times 149)^2$ $= \; (2^2 \; + \; 5^2) \,(149^2 \; + \; 373^2)$ $= \; 4678570$ 