# Find $n$ and $m$, if $n,m$ are natural numbers, such that $m^6 + 279 = 2^n$.

Suppose $$n, m \in \mathbb{N}$$. If $$m^{6}+279=2^{n}$$, find $$n, m$$.

What are some ways to approach this question? Instinct told me to take logarithm but doesn't work to well.

• My first question would be: how do you know this even has solutions? – weierstrash May 30 '20 at 6:38
• Hint: look at everything modulo 7. – achille hui May 30 '20 at 6:39
• @achillehui From that everything becomes obvious, I'd find how to get to that ansatz a more interesting answer. – orlp May 30 '20 at 6:41
• @orlp The general tactic is to modulo a $p$ to make those exponents as few equivalent class as possible. Since $6+1 = 7$ is a prime, $m^6$ is either $0$ or $1$. The rest is following the road.... – achille hui May 30 '20 at 7:55
• The question looks kinda more natural with 729 instead of 279. The answer is the same, though. – Ivan Neretin May 30 '20 at 22:35

Suppose that $$n$$ is odd. Then

$$2=2*1^k\equiv 2*4^k=2^{2k+1}=2^n=m^6+279\equiv m^6=m^2*m^2*m^2(\text{mod }3)$$

If $$m$$ is divisible by $$3$$, then this is $$0$$ modulo $$3$$. If not, then

$$\equiv 1*1*1=1\ (\text{mod }3)$$

Since this is a contradiction either way, we conclude $$n$$ is even. Then we can simplify the equation to

$$m^6+279=4^k$$

for some $$k\in\mathbb{N}$$. Rearranging, we get

$$279=4^k-m^6=(2^k)^2-(m^3)^2=(2^k-m^3)(2^k+m^3)$$

Now, the prime factorization of $$279$$ is

$$279=3*3*31$$

This means that these prime numbers ($$3$$ twice and $$31$$ once) and only these prime numbers can divide

$$(2^k-m^3)(2^k+m^3)$$

Now, we have that

$$31>9=3*3$$

$$2^k+m^3>2^k-m^3$$

Thus, we know

$$31|(2^k+m^3)$$

However, since the other divisors are either $$3$$ or $$9$$, we may conclude

$$2^k+m^3\in\{31,63,279\}$$

Since $$k>9$$ and $$m>7$$ imply

$$2^k+m^3>279$$

we only need to check a finite number of combinations for possible solutions. In fact, we find one candidate:

$$2^2+3^3=31$$

where $$k=2$$ and $$m=3$$. If we plug these into the other factor, we get

$$2^k-m^3=2^2-3^3=4-27=-23$$

Since this is not divisible by $$3$$, we may conclude that the original equation has no solutions.

• At the point $(2^k + m^3)(2^k - m^3) = 3\cdot 3\cdot 31$, noting that the sum of the two factors is a power of $2$ (namely $2^{k+1}$), but none of $279 + 1 = 280$, $63 + 3 = 66$, $31 + 9 = 40$ is, seems quicker/easier to me. – Daniel Fischer May 30 '20 at 12:40
• Ahh, nice trick. That would be faster – QC_QAOA May 30 '20 at 21:07

Based on achille hui's hint we find by exhaustive computation that

$$\forall m: \left(m^6 + 279\right) \bmod 7 \in \{0, 6\}$$ $$\forall n: 2^n \bmod 7 \in \{1, 2, 4\}$$

therefore the two expressions can never be equal.

• No need for much computation. By Fermat's Little Theorem, $m^6 \equiv (0,1) \bmod 7$ and $279=280-1$ is plainly $\equiv -1 \bmod 7$. The $1,2,4$ cycling of $2^n \bmod 7$ is observed by the time $n=4$ at most. – Keith Backman May 30 '20 at 16:43