I have this function $T(x)=x+4B \pmod A$. I want to solve the congruence for the smallest positive $n$, $T^{n} (x)=x \pmod A$. How to solve it and find its period?
To solve it, what I did is by iteration I have $T^{n} (x)=x+4nB$. Then I found that the $x$ can be cancelled out which is $$T^{n}(x)-x \pmod A=x+4nB-x \pmod A=4nB \pmod A.$$ How can I give comment on this one and find its period? I know the period is $A$ but I am not sure how to give a good explanation about this.
Thank you.
This is the smallest $n$ such that $4nB$ is a multiple of $A$. Thus $4nB$ is the l.c.m. of $A$ and $4B$. There's a well-known formula which links l.c.m. and g.c.d.: $$\operatorname{lcm}(A, 4B)\cdot\gcd(A, 4B)=A\cdot4B,$$ hence $$n=\frac{A}{\gcd(A,4B)}.$$