8
$\begingroup$

Roohullah wrote his favorite positive integer $m$ down on a piece of paper. Then Roohullah computed the value $m+m^2+m^3+.....+m^{2m-3}-4$. Roohullah noticed that this value was a prime number. Now I ask you: What are the possible values for the unit digit (last digit) of $m$?

$\endgroup$
1
  • $\begingroup$ Presumably $m > 1$. $\endgroup$ Mar 11, 2016 at 17:49

1 Answer 1

9
$\begingroup$

The answer is

The only possible unit digit is $5$.

Reasoning

We'll assume $m>2$ so the result is non-negative. If $m$ is even then Roohullah's result is even and not prime; hence we'll only consider odd $m$.

If $m$ ends in $1$ then Roohullah's result modulo $10$ is
$2m-3-4 \equiv 5 \bmod 10$.

If $m$ ends in $3$, Roohullah's result modulo $10$ is $(3+9+7)+(1+3+9+7)\left(\frac{m-3}{2}\right)-4 \equiv 5 \bmod 10$

If $m$ ends in $5$, Roohullah's result modulo $10$ is
$10m-15-4 \equiv 1 \bmod 10$

If $m$ ends in $7$, Roohullah's result modulo $10$ is $(7+9+3)+(1+7+9+3)\left(\frac{m-3}{2}\right)-4\equiv 5 \bmod 10$

If $m$ ends in $9$, Roohullah's result modulo $10$ is
$9+(1+9)\left(m-1 \right) -4\equiv 5 \bmod 10$

Since a result ending in $5$ won't be a prime number, the only possibility for the last digit of $m$ is $5$. To show that the prime criteria can be achieved, note that
$5 + 5^2 + 5^3 + \ldots + 5^7 - 4 = 97651$ which is prime.

$\endgroup$
1
  • 1
    $\begingroup$ You have been faster than me, just by a few moments. Nice answer. $\endgroup$
    – Gamow
    Mar 11, 2016 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.