# Powers of 6 and 7771

I lifted this problem from a very active Short Mathematical Idea facebook page, with the solution due to Marian Cucoanes.

$N=6^{n}-7771.$ Prove that if $N$ is prime then $n=N.$

|Contact| |Front page| |Contents| |Arithmetic|

Copyright © 1996-2018 Alexander Bogomolny

$N=6^{n}-7771.$ Prove that if $N$ is prime then $n=N.$

### Solution

From $6\equiv 1\,(mod \,5)$ we have $6^{n}\equiv 1\,(mod \,5),$ for any power of $6.$ It then follows that $6^{n}-7771\equiv 0\,(mod \,5).$ But, since it is declared to be prime, $6^{n}-7771=5,$ meaning $6^{n}=7776,$ or, $n=5.$ Since both $n$ and $N$ are found to equal $5,$ they are equal.

Once you know the solution, it becomes easy and natural to generalize, or simply find out how the problem's composer mind has been working.

Clearly, the numbers in the problem - $6,$ $7771,$ and (from the solution) $5$ - are coincidental. $6=5+1$ whereas $7771=6^{5}-5.$ The fact that $5$ is a prime also appears essential to the problem. So let's try to replace $5$ with an arbitrary prime $p:$

Let $D = (p+1)^{p}-p$ and $N=(p+1)^{n}-D.$ Prove that if $N$ is prime then $n=N.$

We may just follow the proof for $p=5" above:

From $p+1\equiv 1\,(mod \,p)$ we have $(p+1)^{n}\equiv 1\,(mod \,p),$ for any power of $p+1.$ It then follows that

$(p+1)^{n}-D = (p+1)^{n} -[(p+1)^{p} -p]\equiv 0\,(mod \,p).$

But, since it is declared to be prime, $(p+1)^{n}-D=p,$ meaning $(p+1)^{n}=(p+1)^{p},$ or, $n=p.$ Since both $n$ and $N$ are found to equal $p,$ they are equal.

So for example, with $p=3,$ the problem becomes

Let $N=4^{n}-61.$ Prove that if $N$ is prime then $n=N.$

And, for $p=7,$ it is (because $8^7-7=2097145)$

Let $N=8^{n}-2097145.$ Prove that if $N$ is prime then $n=N.$

The author of the original problem has cleverly chosen $p=5$ to avoid working with small or unduely large numbers.

|Contact| |Front page| |Contents| |Arithmetic|

Copyright © 1996-2018 Alexander Bogomolny

64995027 |