Why is this expression an integer? [closed]

The following expression yields an integer answer (very surprisingly it seems).

$${\left (515391\frac{33}{40} \right)}^4 - {\left (384140\frac{39}{40} \right)}^4 = 48783404650404592720562$$

I have tried many other pairs of 6-digit integers , but none of them result in an integer answer. For example: $${\left (515390\frac{33}{40} \right)}^4 - {\left (384141\frac{39}{40} \right)}^4 = 48782630297643606282783.184$$

$${\left (515389\frac{33}{40} \right)}^4 - {\left (384142\frac{39}{40} \right)}^4 = 48781855946299371591451.728$$

$${\left (515392\frac{33}{40} \right)}^4 - {\left (384139\frac{39}{40} \right)}^4 = 48784179004582352493575.376$$

I have tried over a hundred pairs of 6-digit integers , but none of them result in an integer answer. It seems that a special property or characteristic of the pair of integers 515391 and 384140 , makes the above expression an integer. But what special property or characteristic ? Can anyone see why the above expression is an integer ?

• Tip for future enclose math with dollar signs \$\$ otherwise it looks like a bunch of gibberish. Jun 26, 2017 at 23:03
• Do you mean $\dfrac{(33)^4}{40}$ or $\left(\dfrac{33}{40}\right)^4$ The edit favors the first interpretation. Just wanted to check with you, too, Derek. Jun 26, 2017 at 23:06
• Have you made a calculation mistake? For @amWhy 's first and second expressions, none of them (wolframalpha.com/input/…), (wolframalpha.com/input/…) give the answer that you have. Jun 26, 2017 at 23:08
• They're mixed fractions, with the exponent applying to the entire mixed fraction. I'll edit the question to reflect this. Jun 26, 2017 at 23:09
• There are many others, but they are not all that common: e.g. $\left(151359\frac{39}{40}\right)^4-\left(106406\frac{17}{40}\right)^4=396665766866791017179$
– robjohn
Jun 27, 2017 at 15:56

Let $x=40(515391\frac{33}{40})$ and $y=40(384140\frac{39}{40})$. Your expression will be an integer if and only if $x^4-y^4$ is a multiple of $40^4=2^{12}\cdot 5^4$.

The fact that it is a multiple of $40^4$ can be seen by observing the following three things:

• Both $x$ and $y$ are odd.
• Their sum $x+y$ is a multiple of $2^{10}$. (Actually, it's a multiple of $2^{11}$, which is why the integer you got is even, but $2^{10}$ would be good enough.)
• There is a number $q$ (in this case $q=2$) such that $x \equiv 7q \pmod{5^4}$ and $y \equiv 24q \pmod{5^4}$.

Why is this enough? It boils down to the factorization $x^4-y^4=(x-y)(x+y)(x^2+y^2)$:

• Because $x$ and $y$ are both odd, $x-y$ and $x^2+y^2$ are both even. As $x+y$ is a multiple of $2^{10}$, $(x-y)(x+y)(x^2+y^2)$ is a multiple of $2^{12}$.
• Because $x \equiv 7q \pmod{5^4}$ and $y \equiv 24q \pmod{5^4}$, and $(7,24,25)$ is a pythagorean triple, we have: $$x^2+y^2\equiv (7^2+24^2)q^2 =25^2q^2\equiv0 \pmod{5^4}$$

So $x^4-y^4$ is a multiple of both $2^{12}$ and $5^4$, which is what we wanted.

Note that these three conditions are general enough to let you find lots of other pairs $(x,y)$ with $x^4-y^4$ a multiple of $40^4$ (though not all of them):

• Start by choosing $N=x+y$, a multiple of $2^{10}$. For best results, it should be coprime to $5$ (otherwise, the fractions you get won't have 40 in the denominator in reduced form, so it won't look as impressive).
• Since $31$ is coprime to $5$, the equation $N \equiv (7+24)q=31q \pmod{5^4}$ can be solved for $q$. Take $q$ to be a solution to that equation, and choose some odd $x \equiv 7q \pmod{5^4}$.
• Finally, set $y=N-x$. Then $x$ and $y$ satisfy the top three bullet points in this answer, so $x^4-y^4$ will be a multiple of $40^4$.

For example, we could take $N=2^{10} \cdot 123456789 = 126419751936$. Then $N \equiv 61 \pmod{5^4}$, and so we have to solve the equation $61 \equiv 31q \pmod{5^4}$. This equation has solution $q=506$, so we can take any odd $x \equiv 7 \cdot 506 \equiv 417 \pmod{5^4}$. Let's take $x=417 + 5^4 \cdot 98765432 = 61728395417$. Finally, $y=N-x=64691356519$. You can check that $$\left(\frac{x}{40}\right)^4-\left(\frac{y}{40}\right)^4=\left(1543209885\frac{17}{40}\right)^4-\left(1617283912\frac{39}{40}\right)^4$$ is an integer.

Based on your comment, you are specifically interested in $x,y$ which are congruent to 33 and 39 modulo 40. You can do that in the same way, but it takes a little extra work. Since $N=x+y$, we need to take $N \equiv 33+39 \equiv 32 \pmod{40}$ as well as being a multiple of $2^{10}$. It's not hard to check that this happens when $N=2^{10} \cdot p$ where $p \equiv 3 \pmod{5}$. For example, we could take $N=2^{10} \cdot 1000003=1024003072$.

You can check that, if we take $q=462$, then $31q \equiv N \pmod{5^4}$. So we want to choose $x$ with $x \equiv 7 \cdot 462 \equiv 109 \pmod{5^4}$ and either $x \equiv 33$ or $x \equiv 39 \pmod{40}$. The first of these is impossible (because it implies incompatible things about $x$'s mod 5 congruence class) but the second is possible: it happens whenever $x \equiv 1359 \pmod{5000}$. For example, we could take $x=400001359$, and then $y=1024003072 - x = 624001713$. Again, you can check that $$\left(\frac{x}{40}\right)^4 - \left(\frac{y}{40}\right)^4 = \left(10000033 \frac{39}{40}\right)^4- \left(15600042\frac{33}{40}\right)^4\\ = -49224604028046128106617226275$$ is an integer, which after swapping the order of the terms gives you what you want.

• Dear @Micah . All of what you say is correct. But I am looking for expressions of the form (an integer frac{33}{40})^4 - (an integer frac{39}{40})^4= an integer . Your example gives us a way of finding an expression of the form (an integer frac{17}{40})^4 - (an integer frac{39}{40})^4= an integer . This is not what I am looking for !! Jun 27, 2017 at 7:27
• @Derek: See my edit. Jun 27, 2017 at 18:13
• Excellent piece of work. Great Help. This is just what I was looking for !! Thanks very much @Micah!! Jun 27, 2017 at 18:59
• @Derek: If you like Micah's answer, kindly click on the button to accept it. Jun 28, 2017 at 2:43

I don't have a great answer, but here's what I've been able to come up so far.

You've found that

$${\left (515391\frac{33}{40} \right)}^4 - {\left (384140\frac{39}{40} \right)}^4$$

is an integer. This is equivalent to saying that the above number, times $40^4$, is a multiple of $40^4$. In other words,

$${(40 \cdot 515391 + 33)}^4 - {(40 \cdot 384140 + 39)}^4 \equiv 0 \pmod {40^4}.$$

Let's expand those numbers for the time being, and also move the $\equiv$ sign to the middle:

$$20615673^4 \equiv 15365639^4 \pmod {40^4}.$$

Now, since we're working modulo $40^4$, we can disregard any multiple of $40^4$ in the above expression. So this identity reduces down to:

$$135673^4 \equiv 5639^4 \pmod {40^4}.$$

The number $40$ factors into prime powers as $8 \cdot 5$, so by the Chinese remainder theorem, the above identity is equivalent to these two identities:

$$135673^4 \equiv 5639^4 \pmod {8^4};\\ 135673^4 \equiv 5639^4 \pmod {5^4}.$$

Again, we can disregard multiples of $8^4$ and $5^4$, so these identities reduce further down to:

$$505^4 \equiv 1543^4 \pmod {8^4};\\ 48^4 \equiv 14^4 \pmod {5^4}.$$

I don't know how to explain these last two identities, but hopefully they're easier to explain than your original identity.

• You are right ! A very good analysis. Let us see if these last two identities tell us anything about the original question !! Jun 26, 2017 at 23:50