Question

In: Advanced Math

Which positive integers n, where 20 ≤ n ≤ 30, have primitive roots?

Which positive integers n, where 20 ≤ n ≤ 30, have primitive roots?

Solutions

Expert Solution

Let us give a solution using Group Theory.

Result: The multiplicative group Zn* = { [a] in Zn | g.c.d(a,n) = 1 } of invertible elements of Zn is cyclic iff n=2 or 4 or pk or 2pk for some odd prime p.

Observe that |Zn*| = (n) , where (n) is the Euler's totient function.
Now, Zn* is cyclic iff there is an element in it of order (n) ( which generates Zn* ).
In other words, Zn* is cyclic iff there is an integer a such that gcd(a,n)=1 and the multiplicative order of a is (n) modulo n.
This is equivalent to saying that Zn* is cyclic iff n has a primitive root.

Thus, a positive integer n has a primitive root iff Zn* is cyclic iff n=2 or 4 or pk or 2pk for some odd prime p(using the result).

The positive integers n such that 20 n   30 which are one of the form pk or 2pk for some odd prime p are:::
22,23,25,26,27 and 29.

Hence, the positive integers n, where 20 n 30, which have primitive roots are 22,23,25,26,27 and 29.


Related Solutions

We have an array A of size n. There are only positive integers in this array....
We have an array A of size n. There are only positive integers in this array. Note that the array may have integers that are not distinct, and it could be any array of positive integers in creation (I like the numbers found the decimal expansion of π for instance). When possible provide the exact complexity of the algorithm. If it’s not possible explain the O/Ω/Θ complexity. a. Design an efficient algorithm to find the maximum difference between any two...
We have an array A of size n. There are only positive integers in this array....
We have an array A of size n. There are only positive integers in this array. Note that the array may have integers that are not distinct, and it could be any array of positive integers in creation (I like the numbers found the decimal expansion of π for instance). When possible provide the exact complexity of the algorithm. If it’s not possible explain the O/Ω/Θ complexity. a. Design an efficient algorithm to find the maximum difference between any two...
1. We have an array A of size n. There are only positive integers in this...
1. We have an array A of size n. There are only positive integers in this array. Note that the array may have integers that are not distinct, and it could be any array of positive integers in creation (I like the numbers found the decimal expansion of π for instance). When possible provide the exact complexity of the algorithm. If it’s not possible explain the O/Ω/Θ complexity. Design an efficient algorithm to find the maximum difference between any two...
1. We have an array A of size n. There are only positive integers in this...
1. We have an array A of size n. There are only positive integers in this array. Note that the array may have integers that are not distinct, and it could be any array of positive integers in creation (I like the numbers found the decimal expansion of π for instance). When possible provide the exact complexity of the algorithm. If it’s not possible explain the O/Ω/Θ complexity. Design an efficient algorithm to find the maximum difference between any two...
Statement: For a given integer N, print all the squares of positive integers where the square...
Statement: For a given integer N, print all the squares of positive integers where the square is less than or equal to N, in ascending order. Programming Tasks: Prompt the user to input the value of N Output to the screen all squares of positive integers <= N Tests: Item Test 1 Test 2 Test 3 Inputs: 50 9 100 Outputs: 1 4 9 16 25 36 49 1 4 9 1 4 9 16 25 36 49 64 81...
Prove that the following is true for all positive integers n: n is odd if and...
Prove that the following is true for all positive integers n: n is odd if and only if n2 is odd.
prove 2 is a factor of (n+1)(n+2) for all positive integers
prove 2 is a factor of (n+1)(n+2) for all positive integers
Let A[1..n] be an array of distinct positive integers, and let t be a positive integer....
Let A[1..n] be an array of distinct positive integers, and let t be a positive integer. (a) Assuming that A is sorted, show that in O(n) time it can be decided if A contains two distinct elements x and y such that x + y = t. (b) Use part (a) to show that the following problem, re- ferred to as the 3-Sum problem, can be solved in O(n2) time: 3-Sum Given an array A[1..n] of distinct positive integers, and...
Let A[1..n] be an array of distinct positive integers, and let t be a positive integer....
Let A[1..n] be an array of distinct positive integers, and let t be a positive integer. (a) Assuming that A is sorted, show that in O(n) time it can be decided if A contains two distinct elements x and y such that x + y = t. (b) Use part (a) to show that the following problem, re- ferred to as the 3-Sum problem, can be solved in O(n2) time: 3-Sum Given an array A[1..n] of distinct positive integers, and...
C++ program which partitions n positive integers into two disjoint sets with the same sum. Consider...
C++ program which partitions n positive integers into two disjoint sets with the same sum. Consider all possible subsets of the input numbers. All in one C++ file. This is the sample Input 1 6 3 5 20 7 1 14 Output 1 Equal Set: 1 3 7 14 This is the sample Input 2 5 10 8 6 4 2 Output 2 Equal Set: 0
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT