Cryptography Reference
In-Depth Information
c. 79
d. 1801
e. 981
f. 31
g.
31
6. Find all the primes
100 using the Sieve of Eratosthenes.
7. Write a Java program to prompt the user for a positive number
n
, then compute and dis-
play all primes
≤ n
using the Sieve of Eratosthenes. (Hint: Use an array of size
n
+ 1
of type boolean.)
8. Find the gcd of the following sets of integers.
a.
15, 35
b.
21, 99
c.
76, 24, 32
d.
132, 64, 0
e.
99,
100
23
9. Determine if the following lists of integers are mutually relatively prime, pairwise rel-
atively prime, or neither.
a. 198, 252, 54, 18, 9
b. 130, 65, 39, 143
c. 14, 98, 25
d. 32, 27, 35
10. Find a set of four integers which are mutually relatively prime, but not pairwise rela-
tively prime.
11. Find a set of five integers which are mutually relatively prime, but not pairwise rela-
tively prime.
12. Find the gcd of the following sets of integers using the Euclidean algorithm.
a.
f.
83,
318, 3243
b.
21, 364
c.
102, 222
d.
104, 24, 32
e.
132, 64, 40
f.
20785, 44350
g.
99, 121
h.
83, 23
i.
34709, 100313
Search WWH ::




Custom Search