I want to find the period of repetition of the following sequence
$$\left( \frac{x^2}{100}*\left (\frac{2x}{10} \,mod\,\,1\right) \right)\,mod \,1$$
My answer and actual answers are not matching.
The actual answer is 250. But my answer is 100.
My answer:
$\qquad\frac{2x}{10} \,mod\,\,1$ ===> $\frac{x}{5} \,mod\,\,1$
In this division process, let $q$ be the quotient.
So it can be written as $$\frac{x}{5} \,-\,\,1*q = 0$$
I am equating it to zero in-order to find the period. It can again be re-written as $x-5q=0$ which can again be written as $x \,mod\,5$. So its period is 5.
Now the whole original equation in the question can be written as
$$\left( \frac{x^2}{100}* (f(x)) \right)\,mod \,1$$ Here $f(x)$ is a periodic function of period $5$ (I mean our re-written expression from above lines).
USING IDENTITY: $(a\,b) mod \,n = [(a\,mod\,n)\,(b\,mod\,n)]\,mod\,n.$
One can rewrite the above expression as
$$\left(\left( \frac{x^2}{100}\,mod\,1\right)* (f(x)\,mod\,1) \right)\,mod \,1$$
By similar procedure followed above, I got the periodicity of $\left( \frac{x^2}{100}\,mod\,1\right)$ to be $100$ and periodicity of $(f(x)\,mod\,1)$ is $lcm(5, 1) = 5$.
So, finally, the entire expression is simplified as a product of two periodic functions of period 100 and 5 and mod 1 applied on them.
NOTE: The product of two periodic functions is also periodic with a period which is LCM of the periods of the two functions.
So the period of this whole function is $lcm(\,lcm(100,\,5),\,1) = 100$ which is my answer.
But when checked programmatically, the period is 250.
Can someone please point out my mistake?