# How many integer pairs $(x,y)$ satisfy $|x|^m+|y|^m=r$

First let me put the question succinctly:

For whole numbers $m$ and $r$ how many integer pairs $(x,y)$ satisfy the equation $|x|^m+|y|^m=r$?

Now for exposition:

For some motivations to this questions check out: Computing $\beta(\frac{1}{m},\frac{1}{m})$

For a $m=2$ the result can be given in general which I will do below but the sake of example consider the case $m=2$ and $r=45$. Then there are $8$ integer pairs (x,y) such that $x^2+y^2=45$ and this can be seen in the picture below: Generally speaking for the number of integer pairs that satisfy $x^2+y^2=r$ is equal to $$4\sum_{d|r} \chi_2(r)$$ where $$\chi_2(x) = \begin{cases} -1 & \quad \text{if } x \text{ is congruent to 3 mod 4}\\ 1 & \quad \text{if } x \text{ is congruent to 1 mod 4}\\ 0 & \quad \text{if } x \text{ is congruent to 0 mod 2} \end{cases}$$

Now let's look at a case for $m\neq 2$. Consider the case $m=4$ and $r=97$. There are $8$ integer pairs that satisfy the equation $x^4+y^4=97$ as seen in the diagram below. Is there a way to know in general how many solutions there are to $|x|^m+|y|^m=r$?

• Why do you think there must be a solution that takes the form of a divisor sum? The case $m=2$ is special because of its relation to complex multiplication (which has $x^2+y^2$ factoring as $(x+iy)(x-iy)$). I see no reason to believe that this generalizes to higher powers, although it's conceivable there is still an answer to the title question by different methods. – Mario Carneiro Apr 23 '18 at 2:27
• I think you are off by a factor of 4 in your definition of $\chi_2$. – Mario Carneiro Apr 23 '18 at 2:39
• It doesn't look like $\chi_3$ is very nice. Here's a table of the first hundred values: {2, -1, -2, -1, -2, 1, -2, 2, 2, 1, -2, 1, -2, 1, 2, -1, -2, -2, -2, 1, 2, 1, -2, -2, 0, 1, 0, 3, -2, -1, -2, -1, 2, 1, 4, 0, -2, 1, 2, -2, -2, -1, -2, 1, -2, 1, -2, 1, 0, 0, 2, 1, -2, 1, 2, -4, 2, 1, -2, -1, -2, 1, -2, 2, 4, -1, -2, 1, 2, -3, -2, 2, -2, 1, 0, 1, 2, -1, -2, 1, -2, 1, -2, -3, 2, 1, 2, -2, -2, 2, 4, 1, 2, 1, 2, 1, -2, 0, -2, 0} – Mario Carneiro Apr 23 '18 at 2:45
• See also: oeis.org/A175362 ($m=3$) – Mario Carneiro Apr 23 '18 at 3:40
• I used mathematica, not wolfram alpha, and I've had little success running arbitrary mathematica code in alpha without it getting confused by the natural language stuff. Here's a straightforward calculation of those numbers (I didn't keep the original code, but this works too): count[n_] := With[{t = Floor[n^(1/3)]}, Sum[Boole[x^3 + y^3 == n], {x, -t, t}, {y, -t, t}]] chi3[n_] := chi3[n] = count[n] - Sum[chi3[k], {k, Complement[Divisors[n], {n}]}] Table[chi3[n], {n, 100}] – Mario Carneiro Jul 3 '18 at 3:47