  In 2016, while studying restricted sums of integral squares, Sun posed the
following conjecture: Every positive integer $n$ can be written as
$x^2+y^2+z^2+w^2$ $(x,y,z,w\in\mathbb{N}=\{0,1,\cdots\})$ with $x+3y$ a square.
Meanwhile, he also conjectured that for each positive integer $n$ there exist
integers $x,y,z,w$ such that $n=x^2+y^2+z^2+w^2$ and
$x+3y\in\{4^k:k\in\mathbb{N}\}$. In this paper, we confirm these conjectures
via some arithmetic theory of ternary quadratic forms.
