Hey! In this note I'm going to talk about a very cool pattern... in the case of 3, observe the sequence below:
Notice that the digits at the end stay the same! In fact, we add one "fixed" digit every time. The cool part is that this works for every natural number coprime to 1000 - which also implies it works for any prime greater than 5, and that this works 40% of the time! () In this note I'm only covering the special case where has fixed digits -- there are other cases, such as when you use 5, that grow far more quickly.
The first step is to show that if is coprime to 1000 then
This is justified because , where is the Carmichael function which gives the minimum value (for where 100 is) for the equation above. Now, let . Let's compute :
We now have that , and we can induct to show that .
In this section I'll use as a number coprime to 1000. Let be the digit of , and let be the number of digits in . Observe that
Using our previous result, if we evaluate mod , a lot of terms will just become 1 and can be ignored. So we get a new product:
Okay, so really we only care about the last digits of if we're finding the last digits of . (Specifically we raise j to in mod )
Now I can prove the conjecture about the last digits (by induction). The base case is easy, so I'll leap right into showing that the next has fixed digits.
First, we assume that the last digits of are fixed. This means we only need to show that we add another fixed digit in . For this part, let and let be the digit from the end of . We want to show that:
which essentially says that the last digits of will be the last digits of all later terms in the series. The two finds I made earlier make this very easy:
which we may reduce to
We know from earlier that will give , and by definition . Thus the statement we started with is true, and we're done!
Please comment if you have any questions/concerns or any further ideas!