I recognize that there are lots of brings about range theory linked to this problem, e.g. if $N$ is key then $r$ divides $N-one$, but I was not capable of finding a basic recipe that generally will work in polynomial time, nor to point out that it is not possible. Tracking your cycle may help you identify any fundamental circumstances or irregul