So after helping Lynnea with her multiplication tables yesterday, I spent a half hour toying with multiplication myself, I began to ponder digit patterns in multiplications. As Maggie noted yesterday many multiplications form interesting digits patterns (particularly the 9's, or for other bases digit B-1 where B is the base.) Basically, if you multiply by N and crop all but the rightmost N digits of the product, is there always a notable cycle? For example…
Try 2 as the coefficient and start with 1. 2×1 = 2, 2×2 = 4, 2×4 = 8. This continues through 2^6 which is 64. Then 2×64 = 128, crop to 28 and multiply again and you get 56, then 112, crop to 12 and then continue. Presumably at some point you must hit the same pair of digits, as there are only 100 2-digit pairs. Interestingly, including 1 as the starting value, you can only generate 22 pairs of digits before things begin to repeat. Further, the digit pairs 01 and 02 will only arise once… at the beginning since you started with one. After 02 comes 04 and the pattern begins to repeat when after reaching 52 on the 21'st iteration, the next result is 104 crop to 04.
Here's the pattern: 01, 02, 04, 08, 16, 32, 64, 28, 56, 12, 24, 48, 96, 92, 84, 68, 36, 72, 44, 88, 76, 52, 04, 08, …
The cycle length is 20 iterations, and begins on iteration 2. Many of the even digit pairs are excluded (more than half of them). Though I would expect 2x(odd N) to be excluded (i.e. 2×13, 2×15, 2×17) some other exclusions are interesting. The exclusion of 10 is expected because the only way to get it is 2×5 or 2×55. And because 10 is excluded so are all the multiples of 10. You can only get 42 by 2×21 or 2×71 so 42 is out, but 2×42 (84) is allowed, because you can also get it from 2×92.
To get other even digit pairs, you would presumably have to choose a new starting point. Starting from 03 will get you 06, but then the next value is 12 which puts you inside the cycle spelled out above. The 03-trajectory converges on the 01-trajectory in short order. Same thing with 07 (07, 14, 28… convergence) and 09 (09, 18, 36… convergence). But not all alternate trajectories converge like this. 05 yields a completely different pattern (05, 10, 20, 40, 80, 60, 20, 40…). So there are at least 2 trajectories which one could converge to. I wonder if there are others?
The 01-trajectory sequence is noted as “Final two digits of 2^n.” in the OEIS.
I repeated this experiment with larger values for N to detect where the cycle begins and how long it is. Here were the results:
| N | Cycle Begins At |
Cycle Length |
| 1 | 0 | 1 |
| 2 | 3 | 20 |
| 3 | 0 | 100 |
| 4 | 2 | 250 |
| 5 | 5 | 8 |
| 6 | 6 | 3,125 |
| 7 | 0 | 50,000 |
| 8 | 3 | 312,500 |
| 9 | ??? | ??? |
| 10 | 9 | 1 |
Although I'm sure 9 repeats eventually, I gave up after going over 1 million iterations in. I think the cycle lengths are quite interesting. The cycle length for 6 is 5^5… how odd, and for 8 it is 100 x 5^5 (i.e. 5^7 x 2^4). The cycle length for 4 is interesting (1000/4), and 5 is quite short indeed, but you need to get 5 generations in before the cycling begins and 5 generations would be 5^5 or 3,125… sound familiar? The pattern for 5 is: 00001, 00005, 00025, 00125, 00625, 03125, 15625, 78125, 90625, 53125, 65625, 28125, 40625, 3125, 15625…
Interesting that all of the cycle lengths can be expressed as a power of 2 times a power of 5, and 2×5 = 10 (the base used). I wonder if in base 3, all of the cycles would be in length a power of 3, which would be the only divisor of 3 other than one? I suspect it would be, but that's an experiment for another day. Right now I must get back to work.
Anyway, little practical value I'm sure, but it was fun to do.
