Why does this property hold for odd integers except for 5?

103 Views Asked by At

In working on a game I noticed that if I were to take the first ten multiples of seven and consider the last digit of those numbers, the result was exactly one occurrence of each unique digit, zero through nine:

 1 × 7 = 7   =>  7
 2 × 7 = 14  =>  4
 3 × 7 = 21  =>  1
 4 × 7 = 28  =>  8
 5 × 7 = 35  =>  5
 6 × 7 = 42  =>  2
 7 × 7 = 49  =>  9
 8 × 7 = 56  =>  6
 9 × 7 = 63  =>  3
 10 × 7 = 70 =>  0

This struck me as surprising (I'm not a mathematician), so I tried the same thing with all of the other numbers and found the same was true for all of the odd single-digit numbers except for 5.

Why does this property exist? Is there a name for this? What is special about 5 that causes it to not have this property?

2

There are 2 best solutions below

0
On BEST ANSWER

Taking the last digit is the same as dividing by $10$ and taking the remainder.

If we call the expression $a \equiv_n b$ to mean $a$ and $b$ both have the same remainder when divided by $n$, we can notice that if $a \equiv_n a'$ and $b \equiv_n b'$ then $ab \equiv_n a'b'$ and $a + b \equiv_n a' + b'$. (For example: the last digit of $3,456\times 7,482$ is the same as the last digit of $6 \times 2$. Same thing if you do addition.)

If you start with $a \times 1$ and $a \times 2$ and $a\times 3$ eventually you will get a point where $a \times k$ is a multiple of $n$. (After all $a\times n$ is a multiple of $n$ but you may reach it earlier.)

When you get $a \times k$ is a mutliple of $n$ then you have $a\times k \equiv_n 0$ as the remainder is $0$. And then $a\times (k+1) \equiv_n a$ and the whole thing repeats in an infinite loop.

So...... You will always get a repeaiting infinite loop. The question is when will the infinite loop contain all values and we only some?

Well, if $a\times k = N$ and $N$ is the least common multiple of $a$ and $n$ you will get a loop of $k$ different values. Now if $a$ and $n$ are relatively prime--- that means they have no other common factors other than $1$--- then the least common multiple is $a \times n = an$ and your loop contains all values.

So for any odd number other than a multiple of $5$ you get an loop of length $10$ with all digits.

On the other hand if $a$ and $n$ have a greatest common divisor $> 1$, then you will have an infinite loop but it will only contain multiple of the greatest common divisors.

So for instance if you do $5$ it will contain the multiples of $5$. $5,0,5,0,.....etc.$ If you do and even number such as $6$ you will get all the multiples of $\gcd(6,10) = 2$. $6,2,8,4,0,6,2,8,4,0,.... etc.$

2
On

If you want to play with this, replace "10" by any number $n$ and replace "last digit" with "remainder under division by $n$". You will find that this works whenever you take multiples of a number $\{0,2,3,...,n-1\}$ that has no common factor with $n$. It always works when $n$ is prime.

For example, take $4k$ for $k=0,\ldots 12$, and take the remainders under division by 13.

A neat example are the multiples of 7, and their remainders under division by 12: You'll get all numbers from 0 to 11 in order. Try the multiples of 3, 4, or 6, and it won't work.