Why this value can be rotated like in a clock?
...
Are there other such values? How to get them? Is it possible to reach them for some other value like 2 or 3, for example to get it in five moves or in seven moves? Also, it is true for "n=fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", is it possible to get it based on "p=fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"?
There are many such values. Eventually what are you looking for is
Primitive root modulo n. From it you can get every possible root of 1.
Here is an algorithm for finding a primitive root modulo prime p (that is (p-1)-th root of 1):
r = 1
factors = factor(p-1)
for [prime, power] in factors:
x = (p-1)/prime
y = (p-1)/(prime ** power)
for (a=2;;a++):
b = pow(a, x, p)
if (b != 1):
r = (r * pow(a, y, p)) % p
break
(
prime ** power = prime
power)
Modulo p we get the following roots: 2 (square), 3 (cube), 7-th, 13341, 205115282021455665897114700593932402728804164701536103180137503955397371, and any multiple of these numbers, for a total of 2
5-1 = 31 possible roots (2nd, 3rd, 6th, 7th, 14th, 21st, 42th,...). Each k-th prime root has k-1 possible values besides 1. However if k is composite, some of the k-1 values are the corresponding smaller root, i.e. if a is 6-th root of 1, a
3 would be square root of 1, and not 6th.
Modulo n we get the following factors (and roots): 2
6, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 2
6 - 1 = 447 possible roots. Your example is for 2
2*3=12-th root.
Here are two primitive roots of 1 modulo the corresponding prime:
n: rn = 106331823171076060141872636901030920105366729272408102113527681246281393517969
p: rp = 77643668876891235360856744073230947502707792537156648322526682022085734511405
So, let's say you want a 631th root of 1 modulo n: x = pow(rn, (n-1)/631, n). Since 631 is prime number, you could get all 631 possible 631-th roots of 1 (modulo n) by rising x to the power from 1 to 631.