maridão
-
Sinalizar
como inapropriado
-
Mostrar
Show review history
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): (prime ** power = primepower) 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 25-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, a3 would be square root of 1, and not 6th. Modulo n we get the following factors (and roots): 26, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 26 - 1 = 447 possible roots. Your example is for 22*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.
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): (prime ** power = primepower) 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 25-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, a3 would be square root of 1, and not 6th. Modulo n we get the following factors (and roots): 26, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 26 - 1 = 447 possible roots. Your example is for 22*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.
This review was marked as helpful by
4 people
Sr. Gordo ✠
-
Sinalizar
como inapropriado
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): (prime ** power = primepower) 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 25-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, a3 would be square root of 1, and not 6th. Modulo n we get the following factors (and roots): 26, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 26 - 1 = 447 possible roots. Your example is for 22*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.
This review was marked as helpful by
90 people
Luann Andrade
-
Sinalizar
como inapropriado
-
Show history of
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): (prime ** power = primepower) 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 25-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, a3 would be square root of 1, and not 6th. Modulo n we get the following factors (and roots): 26, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 26 - 1 = 447 possible roots. Your example is for 22*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.
This review was marked as helpful
by 620 people