# How to represent Fermat number $F_n$ as a sum of three squares?

Let $F_n=2^{2^n}+1$ be the Fermat number. How to represent the Fermat number $F_n$ for $n \geq 3$ as a sum of three squares of different natural numbers? For example for $n=3$ we have $$F_3=257=5^2+6^2+14^2.$$ Is there any simple procedure to write out such representations for another $n$?

• $$F_n= (2^{2^{n-1}})^2+1^2 +0^2$$ – N. S. Sep 17 '14 at 16:01
• I am sorry, the numbers must be natural and different. Zero is not allowed. I have edited the question. – Leox Sep 17 '14 at 16:04
• Does this question have some motivation behind it? Is it from a competition? Or just a general curiosity? – Alex R. Sep 17 '14 at 16:45
• Another trivial case is $x=y=2^{2^{n-2}},z=2^{2^{n-1}}-1$... Obviously violates the "distinct numbers" rule. – abiessu Sep 17 '14 at 18:29

Let $X=2^{2^{n-1}}$. Then $X$ is congruent to $1$ modulo $3$, so
$$F_n=X^2+1=\bigg(\frac{2X+1}{3}\bigg)^2+ \bigg(\frac{2X-2}{3}\bigg)^2+ \bigg(\frac{X+2}{3}\bigg)^2$$
The values are all distinct, except when $X=1$ or $4$ (which are excluded since $n\geq 3$).