Why $(n^x +n^{x+2})$ is divisible by $5$ for some $n$ and not for others.

18 Views Asked by At

Why for numbers with last digits $0, 2, 3, 5, 7$ and $8, (n^x +n^{x+2})/5$ is a whole number and for numbers with last digits $1, 4, 6$ and $9, (n^x +n^{x+2})/5$ is not a whole number?

1

There are 1 best solutions below

0
On

Because $n$ is congruent to its last digit modulo $10$, hence also modulo $5$, and because in the factorisation $$n^x+n^{x+2}=n^x(1+n^2),$$ you can check the second factor is congruent to $0\bmod 5$ only if the digit is $2,3,7,8$, and the first factor is divisible by $5$ if and only if the last digit is $0$ or $5$.