-1
$\begingroup$

As of today I was introduced to modular math and therefore I am very new and unfamiliar to this. Could someone thoroughly walk me through this question step by step?

  • 3
    This is true if and only if $a\not\equiv 0\pmod{5}$. See [Fermat's Little Theorem](https://en.wikipedia.org/wiki/Fermat's_little_theorem).2017-02-09
  • 0
    Possible duplicate of [Fermat's little theorem's proof for a negative integer](http://math.stackexchange.com/questions/1757211/fermats-little-theorems-proof-for-a-negative-integer)2017-02-09

3 Answers 3

4

Addition and multiplication are compatible with mod arithmetic. So, if $a\equiv b\ \pmod 5$, then $a^n\equiv b^n\ \pmod 5$. Thus you only need to consider $a=0,1,2,3,4$.

Let's check:

  • for $a=0$, your equality is not true: $0^4=0$ is not of the form $5k+1$;

  • for $a=1$: $a^4=1$, so $a^4\equiv 1\pmod 5$;

  • for $a=2$: $a^4=16=3\times5+1$, so $ a^4\equiv 1 \pmod 5$;

  • for $a=3$: $3^2=81=16\times5+1$, so $a^4\equiv 1\pmod 5$;

  • for $a=4$: $4^2=16=3\times 5+1$, so $a^2\equiv 1\pmod 5$; then $a^4=a^2\times a^2\equiv 1\times1\pmod5$ .

In summary, $a^4\equiv 1\pmod 5$ whenever $a\not\equiv0\pmod 5$, i.e. when $a$ is not a multiple of $5$.

  • 0
    I think i'm slowly starting to understand. Thank you!2017-02-09
  • 1
    For a newbie at modular arithmetic it would be nice see that you can calculate $4^4 = 4^2 \times 4^2 \equiv 1 \times 1 = 1 \pmod{5}$ without having to look at a number as big as $256$.2017-02-09
  • 0
    Good point. I was a computer geek in another life, so the first sixteen powers of two are not "calculation" nor "big" :)2017-02-09
  • 0
    This is a good answer because it depends only on the most basic facts and methods.2017-02-09
  • 0
    I like this method, but I generally prefer shortening by saying $a = 0, \pm 1, \pm 2 \pmod 5$ to begin with.2017-02-10
  • 0
    65536 @MartinArgerami2017-02-10
2

First of all you can check: $$1^4=1\equiv 1 \pmod5, 2^4=16 \equiv 1\pmod5, 3^4=81 \equiv 1\pmod 5, 4^4=256\equiv 1\pmod 5 $$

It is true in general that $a^p\equiv a \pmod p $ and it is called "Fermat's little theorem".

-1

A proof by induction.

It is true for $1 \le a \le 4$ by direct calculation ($a^4 = 1, 16, 81, 256$).

Suppose it is true for $a$. Then

$\begin{array}\\ (a+5)^4 &=a^4 + 5*5a^3 + 10*5^2 a^2+5*5^3a + 5^4\\ &=a^4 + 5(5a^3 + 50 a^2+5^3a + 5^3)\\ \end{array} $

so that $(a+5)^4$ has the same remainder mod $5$ as $a^4$.

Therefore every integer of the form $5a+b$ where $1 \le b \le 4$ has the remainder $1$ when divided by $5$.

Note that, if we write $(a+5)^4 =a^4 + 25(a^3 + 10 a^2+5^2a + 5^2) $, this shows that $(a+5)^4$ has the same remainder mod $25$ as $a^4$.