What is the cardinality of set $\big\{(x,y,z)\mid x^2+y^2+z^2= 2^{2018}, xyz\in\mathbb{Z} \big\}$?
Since I have very limited knowledge in number theory, I tried using logarithms and then manipulating the equation so that we get $$10^{2018}+2=x^2+y^2+z^2.$$ Then setting one of $x,y,z$ equal to $\sqrt{2}$ we find all values of $x$ and $y$ where $$2x^2+y^2=10^{2018}.$$ Finally we use combinatorics to get the required answer. However this led to no-where.
What is the correct way to solve this problem?
The question is unclear. I shall consider two sets $$S:=\Big\{(x,y,z)\in\mathbb{Z}\times\mathbb{Z}\times\mathbb{Z}\,\Big|\,x^2+y^2+z^2=2^{2018}\Big\}$$ and $$T:=\Big\{(x,y,z)\in\mathbb{R}\times\mathbb{R}\times\mathbb{R}\,\Big|\,x^2+y^2+z^2=2^{2018}\text{ and }xyz\in\mathbb{Z}\Big\}\,.$$
To calculate $|S|$, note that $0$ and $1$ are the only residues modulo $4$. Therefore, for any integers $a$, $b$, and $c$, $a^2+b^2+c^2\equiv 0\pmod{4}$ if and only if $a$, $b$, and $c$ are even. From this result, we conclude that, for any $(x,y,z)\in S$, $x=2x_1$, $y=2y_1$, and $z=2z_1$ for some integers $x_1$, $y_1$, and $z_1$. Note that $$x_1^2+y_1^2+z_1^2=2^{2016}\,.$$ For a positive integer $k<1009$, suppose that $(x_k,y_k,z_k)$ has been defined with $$x_k^2+y_k^2+z_k^2=2^{2(1009-k)}\,.$$ By the same argument, there exist integers $x_{k+1}$, $y_{k+1}$, and $z_{k+1}$ such that $x_k=2x_{k+1}$, $y_k=2y_{k+1}$, and $z_k=2z_{k+1}$. That is, $$x_{k+1}^2+y_{k+1}^2+z_{k+1}^2=2^{2(1008-k)}=2^{2\big(1009-(k+1)\big)}\,.$$ By induction, we see that $$x=2^{1009}x_{1009}\,,\,\,y=2^{1009}y_{1009}\,,\text{ and }z=2^{1009}z_{1009}\,,$$ with $$x_{1009}^2+y_{1009}^2+z_{1009}^2=1\,.$$ Thus, there are only six possible choices for $(x_{1009},y_{1009},z_{1009})$, namely $$(\pm 1,0,0)\,,\,\,(0,\pm1,0)\,,\text{ and }(0,0,\pm 1)\,.$$ Ergo, $S$ contains $6$ elements: $$\left(\pm 2^{1009},0,0\right)\,,\,\,\left(0,\pm2^{1009},0\right)\,,\text{ and }\left(0,0,\pm 2^{1009}\right)\,.$$ That is, $|S|=6$.
To calculate $|T|$, we shall prove that the polynomial $$p(t):=t^3-t^2+\lambda t-\frac{1}{64}$$ has three distinct positive real roots $\alpha_\lambda$, $\beta_\lambda$, and $\gamma_\lambda$, for all real numbers $\lambda$ satisfying $$0.232\leq \lambda\leq 0.282\,.\tag{*}$$ For a proof, note that the discriminant of $p(t)$ as a polynomial in $\lambda$ is $$d(\lambda):=-4\lambda^3+\lambda^2+\frac{9}{32}\lambda-\frac{283}{4096}\,.$$ Using a numerical software, we see that $d(\lambda)>0$ for all $\lambda$ satisfying (*). Observe now that $$(x,y,z):=\left(2^{1009}\sqrt{\alpha_\lambda},2^{1009}\sqrt{\beta_\lambda},2^{1009}\sqrt{\gamma_\lambda}\right)$$ satisfies $$x^2+y^2+z^2=2^{2018}\text{ and }xyz=\frac{2^{3\cdot 1009}}{\sqrt{64}}=2^{3024}\,.$$ This shows that $|T|\geq \mathfrak{c}$, where $\mathfrak{c}$ is the continuum. On the other hand, $|T|\subseteq \mathbb{R}\times\mathbb{R}\times\mathbb{R}$, making $|T|\leq \mathfrak{c}^3=\mathfrak{c}$. That is, $|T|=\mathfrak{c}$.