Can we prove a stronger claim?

Here it is asked whether for every $k>1$, there is a prime $p$ and $w_1,w_2,\cdots ,w_k>1$, such that $p$ divides $w_1^2+w_2^2+\cdots +w_k^2$, but none of the summands.

Can we prove there is a solution for every $k$, if the $w$s must be pairwise distinct ? The prime $p$ need not be the same for different $k$s.

• math.stackexchange.com/questions/2452850/… – user480281 Oct 1 '17 at 13:39
• One can think probabilistically: if you fix $p$ and $k$, and say that $p$ should divide none of the values $w_i$, then (modulo $p$) there are $(p-1)$ choices for each $w_i$. Out of these $(p-1)^k$ choices for the tuple $(w_1, w_2, \dots, w_k)$, if you consider the sum $w_1^2 + \dots + w_k^2$ for each of them, then in fact (as the sum of squares has no special correlation with anything) about $1/p$ of them (so about $(p-1)^k/p$ tuples) will have sum $0$ modulo $p$. (The “pairwise distinct” is not a problem because you can always replace any $w_i$ with any other $w_i + mp$ for any integer $m$.) – ShreevatsaR Oct 1 '17 at 19:33

Yes. Let $p$ be any prime dividing $k$ (it exists since $k > 1$). Then set $w_1 = p + 1, \: w_2 = 2p + 1, \: \dots, \: w_k = kp + 1$ (in general, $w_i = ip + 1$).

Now, clearly $p \nmid w_i$ and the $w_i$'s are pairwise distinct. Moreover, $$w_1^2 + w_2^2 + \cdots + w_k^2 \equiv \underset{k \: \text{times}}{\underbrace{1 + \cdots + 1}} = k \equiv 0 \pmod{p}$$ Thus $p \mid w_1^2 + \cdots + w_k^2$.

By the argument described here; we can prove a more stronger problem;
i.e. we can let $k \geq 3$ and $p\geq 7$ both be arbitrary.

A: For every $k>1$, there is a prime $p$ and $w_1,w_2,\cdots ,w_k>1$, such that $p$ divides $w_1^2+w_2^2+\cdots +w_k^2$, but none of the summands.

Consider you have an ordered $k$-tuple $(w_1,w_2,\cdots ,w_k)$ satisfiying A; then for every $1 \leq i \leq k$ and every $k \in \mathbb{N}$ ; let

$$w_i':=w_i+kp \ \ \text{ and for every } \ \ j\neq i \ \ \ w_j':=w_j;$$ then one can checks that the ordered $k$-tuple $(w_1',w_2',\cdots ,w_k')$ will satisfies A too.

Doing this procedure consecutively we will get an ordered $k$-tuple with distinct elements.

• @Peter , This solutions; answers a more stronger problem; you can choose $p\geq 7$ arbitrary, as you can choose $k\geq 3$ arbitrary. – Davood KHAJEHPOUR Oct 1 '17 at 14:05
• If I understand it right, you add $p,2p,3p,\cdots,kp$ to the orderd vector $w_1,w_2,\cdots ,w_k$, right ? To show that $p$ can be arbitary, you must show that we have a solution satisfying condition $A$. This is not obvious. – Peter Oct 1 '17 at 14:13
• @Peter , I have showed the existence in the another problem that you have shared it's link: math.stackexchange.com/questions/2452753/… . – Davood KHAJEHPOUR Oct 1 '17 at 14:17

$$\text{One more solution . . .} \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\;\;\;\;\;$$ \begin{align*} \text{Claim:}\;&\text{The prime $p=17$ works for all integers $k > 1$.}\\[8pt] \text{Case$\;(1)\text{:}\;$}&\text{$k$ is even.}\\[8pt] &\text{Choose integers}\;x_1,...,x_k,\;\text{all distinct, such that}\\[8pt] &\qquad{\small\bullet}\;\;{\small{\frac{k}{2}}}\;\text{of them are}\;\equiv 4\;(\text{mod}\;17)\\[4pt] &\qquad{\small\bullet}\;\;{\small{\frac{k}{2}}}\;\text{of them are}\;\equiv 1\;(\text{mod}\;17) \\[8pt] &\text{Then}\;17\;\text{doesn't divide any of $x_1,...,x_k$}\\[4pt] &\text{but}\;\;\sum_{i=0}^k x_i^2 \equiv \left({\small{\frac{k}{2}}}\right)4^2 + \left({\small{\frac{k}{2}}}\right)1^2 \;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv\; \left({\small{\frac{k}{2}}}\right)(4^2+1^2)\;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv\; \left({\small{\frac{k}{2}}}\right)(0)\;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv\;0\;(\text{mod}\;17)\\[4pt] &\text{which proves the claim for case $(1)$.}\\[8pt] \text{Case$\;(2)\text{:}\;$}&\text{$k$ is odd, $k \ge 3$.}\\[8pt] &\text{Choose integers}\;x_1,...,x_k,\;\text{all distinct, such that}\\[8pt] &\qquad{\small\bullet}\;\;\text{one of them is}\;\equiv 6\;(\text{mod}\;17)\\[4pt] &\qquad{\small\bullet}\;\;{\small{\frac{k+1}{2}}}\;\text{of them are}\;\equiv 4\;(\text{mod}\;17)\\[4pt] &\qquad{\small\bullet}\;\;{\small{\frac{k-3}{2}}}\;\text{of them are}\;\equiv 1\;(\text{mod}\;17) \\[8pt] &\text{Then}\;17\;\text{doesn't divide any of $x_1,...,x_k$}\\[4pt] &\text{but}\;\;\sum_{i=0}^k x_i^2 \equiv 6^2 + \left({\small{\frac{k+1}{2}}}\right)4^2 + \left({\small{\frac{k-3}{2}}}\right)1^2 \;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv 2 + \left({\small{\frac{k+1}{2}}}\right)16 + \left({\small{\frac{k-3}{2}}}\right)1 \;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv 2 + \left({\small{\frac{k+1}{2}}}\right)16 + \left({\small{\frac{k-3}{2}}}\right)18 \;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv 2 + (8k+8) + (9k-27) \;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv 17k-17\;(\text{mod}\;17)\\[4pt] &\qquad\qquad\;\;\;\;\equiv\;0\;(\text{mod}\;17)\\[4pt] &\text{which proves the claim for case $(2)$.}\\[8pt] &\text{Thus, the proof of the claim is complete.}\\[8pt] \end{align*}