# Prove that number $4p^2+1$ can show as sum of squares of three different numbers [duplicate]

Let $$p>3$$ is prime number. Prove that number $$4p^2+1$$ can show as sum of squares of three different numbers.

Only what I know that every prime number $$p>3$$ can show as $$p=6k+1$$ or $$p=6k-1$$, such that $$k \in \mathbb Z$$.

If I put $$p=6k+1$$, then $$4(6k+1)^2+1=(12k)^2+(24k+3)^2-(24k+2)^2$$, here I did not show what they want in task.

For $$p=6k-1$$ things do not change, do you have some idea?

## marked as duplicate by Steven Stadnicki, vrugtehagel, Namaste discrete-mathematics StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 21 '18 at 19:41

• Does $0$ count as a square here? I mean $4\cdot 7^2+1 = 0^2+1^2+14^2$, and $0,1,14$ are distinct. If yes, this is quite trivial: $4p^2+1=0^2+1^2+(2p)^2$ for any integer $p\neq 0$. – user614671 Nov 21 '18 at 16:42
• It is possible to ignore $0$, as I did in my answer @Snookie . – Mohammad Zuhair Khan Nov 21 '18 at 16:46
• no you can not include 0 – Marko Škorić Nov 21 '18 at 16:48

Notice that $$5=1^2+2^2,$$ so:
$$4(6k+1)^2+1=144k^2+48k+5=(ak)^2+(bk+1)^2+(ck+2)^2=(a^2+b^2+c^2)k^2+(2b+4c)k+5$$
$$\therefore 144=a^2+b^2+c^2 \qquad$$ and $$\qquad 2b+4c=48$$
By trial and error, I found that $$a=4, b=8, c=8$$.
So $$4(6k+1)^2+1=(4k)^2+(8k+1)^2+(8k+2)^2$$
Now for $$p=6k-1,$$
$$4(6k-1)^2+1=144k^2-48k+5=(ak)^2+(bk-1)^2+(ck-2)^2=(a^2+b^2+c^2)k^2-(2b+4c)k+5$$
$$\therefore 144=a^2+b^2+c^2 \qquad$$ and $$\qquad -48=-(2b+4c)$$
So, $$4(6k-1)^2+1=(4k)^2+(8k-1)^2+(8k-2)^2$$