Given $$$X,p,a,b$$$, we need to find out how many $$$n\in\mathbb N,\;(1\leqslant n\leqslant X)\;$$$ satisfy the following condition:
>
Constraints:
I have no idea how to solve this question, any approach or proof will be highly appreciated.
Thank you in advance!
Only $$$X$$$ is given? What about $$$a$$$ and $$$b$$$ and $$$p$$$? They can be anything?
It seems related to the discrete logarithm, so start by reading about it.
https://en.wikipedia.org/wiki/Discrete_logarithm
still got no idea.
Deleted comment.