# The number of solutions to $\frac{1}x+\frac{1}y+\frac{1}z=\frac{3}n,x,y,z\in\mathbb N$

Denote $$g(n)=\{\{x,y,z\}\mid \frac{1}x+\frac{1}y+\frac{1}z=\frac{3}n,x,y,z\in\mathbb N\},$$ $$h(n)=\{\{x,y,z\}\mid \frac{1}x+\frac{1}y+\frac{1}z=\frac{3}n,1\leq x\leq y\leq z,x,y,z\in\mathbb N\},$$ let $f(n)=|g(n)|$ be the number of members of $g(n)$.

For example, $h(3)=\{\{2,3,6\},\{2,4,4\},\{3,3,3\}\},f(3)=6+3+1=10.$

Since $\{n,n,n\}$ is a solution to $\frac{1}x+\frac{1}y+\frac{1}z=\frac{3}n$, it's easy to see that $f(k)\equiv 1\pmod 3,\forall k\in \mathbb N.$

Question: I find that $$f(3k)\equiv 0,f(4k+2)\equiv 0,f(6k\pm1)\equiv1 \pmod 2,\forall k\in \mathbb N.$$ I wonder how to prove them?

Edit: I find that $f(n)$ has the same parity to the number of solutions to $\frac{1}x+\frac{2}y=\frac{3}n,$ I think I have got it now.

-
@Calvin Lin If not, I will type $\{2,3,6\}$ $6$ times and $\{2,4,4\}$ $3$ times in my example, such as $\{2,3,6\},\{2,6,3\},\{3,2,6\}\dots$ – Next Sep 1 '13 at 4:23
Ah I see. This makes sense now. Thanks – Calvin Lin Sep 1 '13 at 4:26
If you have an answer, you are encouraged to post it and accept it. That way others can see it and your question doesn't stay in the still open queue. – Ross Millikan Sep 1 '13 at 4:38

Since I already know how to prove them, I write a proof here now.

It's easy to see that in $h(n)$,

(1)if $x,y,z$ are distinct, then $x,y,z$ add $6$ to $f(n)$,

(2)if just two of them are equal, add $3$ to $f(n)$,

(3)if $x=y=z$, then they add $1$ to $f(n)$.

Since $6$ is even, case (1) didn't change the parity of $f(n)$. Hence $f(n)$ has the same parity of the number of solutions to $\frac{1}x+\frac{2}y=\frac{3}n.$ This is $(3x-n)(3y-2n)=2n^2,$ let $r(n)$ be the number of solutions to this equation.

If $n=3m,$ then $(x-m)(y-2m)=2m^2,$ hence $f(n)\equiv r(n)=d(2m^2)\equiv 0\pmod 2.$

If $n=6m+1$, then $3x-n=a,3y-2n=b,$ $$f(n)\equiv r(n)=\sum_{\substack{ab=2n^2\\a\equiv -n\equiv 2\pmod 3\\b\equiv -2n\equiv 1\pmod 3}}1=\frac{1}2d(2n^2)=d(n^2)\equiv 1\pmod 2.$$ The same to $n=6m-1.$

If $n=4m+2,$ then if $3\mid n$, we get $2\mid f(n),$ too. If $3\not \mid n$, then $2n^2\equiv -1\pmod3,f(n)\equiv r(n)=\dfrac{1}2d(2n^2)=2d((2m+1)^2)\equiv 0\pmod 2.$

Now we get a little more: $$f(n) \equiv \begin{cases} \dfrac{1}2d(2n^2), & 3\not\mid n \\ 0, & 3\mid n \\ \end{cases} \pmod 2$$

-