Sunday, March 18, 2018

sequences and series - arithmetic progression, division and remainder. finding pattern length



When all elements in a arithmetic progression are divided by a constant number k, and are written down the remainder, you'll quickly notice that a series of numbers will appear.
simple example



7   42  77  112 147 182 217 252 287 322 357 392 (progression, 35 added each time)


7 42 17 52 27 2 37 12 47 22 57 32 (remainder after division by 60)


When 35 is added again, that gives 392+35=427. The remainder after division by 60 is again 7. The pattern



7   42  17  52  27  2   37  12  47  22  57  32


repeats itself. In this example, this pattern consists of 12 numbers.




Can you calculate the length of that pattern with a formula when you know the constant difference in the progression and the constant number? I tried to figure this out, but failed.


Answer



The period in the example is the smallest number $k$ with the property $$35k\equiv 0 \mod 60$$



We get $$k=\frac{60}{\gcd(35,60)}=\frac{60}{5}=12$$



This way you can find the period in general.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...