Counting in 2's, 3's, 4's, ... 9's - is there a general rule how to produce (repeating) sequence of last digits?

167 Views Asked by At

If I count in 3's like $(3,6,9,12,15, ...)$ - then the last digit forms a repeating sequence $[3, 6, 9 / 2, 5, 8 / 1, 4, 7 / 0]$ (slash separates logical groups - we just do "minus one" from each number in the first [3,6,9] group, then we do "minus two", until "three minus three" gives zero).

If I count in 4's like $(4, 8, 12, 16, 20, 24, 28, ...)$ - then the last digit forms a repeating sequence $[4, 8, 2, 6, 0]$. I don't see any (easy mnemonic) rule here - like in the above "count in 3's" case.

Question: if I count in 2's, 3's, 4's, 6's, 7's, 8's, 9's - is there a general rule for n (n=2, n=3, ... n=9) how to produce that repeating sequence of last digits?

For 3's there is a simple (though not general) rule - take $3, 6, 9$ and subtract one until $3-3=0$ (see the first paragraph).

Maybe there is a similar simple rule for others (4's, 6's, 7's, 8's, 9's) or even a general rule (one simple trick for them all).

P.S. Originaly I wanted to provide a nice life-hack for my child learning to count in 3's, 4's etc - this hack is highly wanted, but besides I got interested myself. Sorry, I'm not a professional mathematician. Maybe modular arithmetics or some modern algebra / number theory findings (ring of residues modulo N?) does that (mnemonic / generalizing) trick?

2

There are 2 best solutions below

1
On BEST ANSWER

If you want to explain this property to a child, just write the digits $0$ to $9$ on a circle and view it as an Harry Potter's style imaginary clock with only $10$ hours. If you count by $3$ around this clock, you will find successively $0, 3, 6, 9, 2, 5, 8, 1, 4, 7, 0$ and if you count by $4$, you will find $0, 4, 8, 2, 6, 0$.

You can experiment with a clock with $12$, $7$ or $15$ hours to see what happens.

Now, the mathematical explanation. If you have a clock with $n$ hours and you count in $c$ ($O, c, 2c, 3c$, etc.), the length of the cycle will be $n/d$ where $d$ is the greatest common divisor of $n$ and $c$. For instance for $n =10$ and $c = 3$, one has $d = 1$ and thus the length of the cycle is $10$. If $c = 4$, one has $d =2$ and thus the length of the cycle is $10/2 = 5$.

1
On

Your rule for $4$ does have a somewhat similar simple pattern, $[4,8/2,6/0]$, where $2$ is subtracted from the first group of two to get the second group of two.

The rule for $7$ is the reverse of the rule for $3$, $[7,4,1/8,5,2/9,6,3/0]$, while the rule for $6$ is the reverse of the rule for $4$, $[6,2/8,4/0]$.

The rules for $1$ and $2$ are fairly simple, while the rules for $9$ and $8$ are the reverses of these.

The answer of J.-E. Pin and the comments of Gone explain some of what is going on here. It's a good exercise to try this in other number bases to see how things differ, and to understand why. The groups of three that you see for $3$ and $7$ in base $10$ are related to the fact that $10-1$ is divisible by $3$. Since $12-1=11$ is prime, you aren't going to have such nice patterns in base $12$. For example, for $5$ you have $[5,A,3,8,1,6,B,4,9,2,7,0]$. You can think up different ways of grouping these, but they won't be as nice as what you get for $3$ in base $10$.