Let $p$ be an odd prime number. Prove that there exist nonnegative integers $x,y,z,t$ not all of which are $0$ such that $t<p$ and \[x^2+y^2+z^2=tp.\]
Problem
Source: Romania JBMO TST 2022
Tags: number theory, romania, Romanian TST
03.06.2022 22:52
$p = 5$ doesn't work. here is a proof for all the others: If we can choose $t$ such that $tp$ is not expressible as the sum of 2 nonnegative squares but expressible as the sum of 3 nonnegative squares we will be done. The aim is to get $tp \equiv 3 \pmod 8$ as this meets both the above requirements. If $p > 8$ we can pick $t$ as $3/p$ modulo $8$. If $p = 7$, take $t = 5$; if $p = 3$, take $t = 1$.
03.06.2022 23:15
Isn't this problem a bit old: korea 2000 but we can take also $0$ as $x,y,z$
04.06.2022 00:17
A computer search shows no solutions for $p=5$. So, either $x,y,z\ge 0$ is the condition, or $p>5$ must be there (I suspect the former). Anyways, here is a solution for `fixed' version. Case 1. $p\equiv 3\pmod{4}$. Take $z=1$, consider the following sets in modulo $p$: \[ A=\left\{x^2:0\le x\le\frac{p-1}{2}\right\}\quad\text{and}\quad B=\left\{-y^2-1:0\le y\le \frac{p-1}{2}\right\}. \]I claim $A\cap B\ne\varnothing$. Assume the contrary. Then, $|A\cup B| = |A|+|B|=p+1$. Notice, however, that $|A\cup B|\le |\mathbb{Z}_p|=p$, absurd. Hence, there exists $x_0,y_0$ so that $x_0^2\equiv -y_0^2-1\pmod{p}$. Check that $x_0,y_0\ne 0$ as $p\equiv 3\pmod{4}$. Thus, $x_0^2+y_0^2+1$ is divisible by $p$. Using $x_0,y_0\le \frac{p-1}{2}$, it is easy to verify $t<p$, as requested. Case 2: $p>5$ and $p\equiv 1\pmod{4}$. Let $y=3$ and $z=4$. Note that there exists an $x$ such that $x^2\equiv -25\pmod{p}$ and $p\nmid x$ as $(-1/p)=1$. Furthermore, we can assume $x\le \frac{p-1}{2}$. Doing the math, it is not hard see that for $p>5$, $t<p$ as requested. Remarks. @P2nisic: you have a right call that this is `almost' Korea 2000; with the exception that $x,y,z=0$ is allowed in that problem. This one, however, restricts to $x,y,z>0$, for which you need more work. I suspect they took Korea verbatim, added positive integer condition without realizing that $p=5$ then would not work.
04.06.2022 00:45
Indeed, in the original statement we are asked to prove the existence of $x,y,z,t\in\mathbb{Z}_{\geq 0}$ with $x,y,z,t$ not all $0$ such that the above condition holds. Using Legendre's three-square theorem, if $p\not\equiv 7\pmod 8$ we may take $t=1$ and otherwise $t=2$.
04.06.2022 11:59
Well if the original statement had nonnegative numbers $t = 2$ would always work. So
04.06.2022 12:01
Yes, the original statement allowed nonnegative integers, I am terribly sorry for the typo!
04.06.2022 17:48
oVlad wrote: Let $p$ be an odd prime number. Prove that there exist nonnegative integers $x,y,z,t$ not all of which are $0$ such that $t<p$ and \[x^2+y^2+z^2=tp.\] $t = 2$ works by Legendre's 3 square theorem
14.02.2023 11:39
It can be solved by Legendre's $3$ square theorem; $n=x^{2}+y^{2}+z^{2}$ if and only if $n$ is not of the form $n =4^a(8b+7)$ for nonnegative integers $a$ and $b$. As said above, $t=2$ always works.