Exercises On Prime Numbers
Exercises On Prime Numbers
04 - Find all the primes that are equal to a perfect square minus 1.
Solution:n2-1 = (n + 1)(n - 1). (n + 1) and (n - 1) are two integers whose difference is 2. In order for
2
-1 is a multiple of two integers and is prime, one of the integers can only be 1. As n + 1
For n–1, we must have n–1 = 1⇒ n = 2. Thus, n2-1 = (2 + 1)(2–1) = 3.1 = 3.
05 - Find all the primes that are equal to a perfect cube minus 1.
Solution:n3-1 = (n-1)(n2(n + 1). Following the same previous reasoning, n - 1 = 1⇒ n = 2.
Therefore: n3-1 = 23 - 1 = 7. Answer: 7.
06–Determine all positive integers n such that n, n + 2, and n + 4 are all prime.
Solution: n cannot be even because n = 2k, we would have n + 2 = 2k + 2 = 2(k + 1) which is even, therefore, no.
é first. Thus, n n + 2 e n + 4 are three odd consecutives.
For n = 3, n + 2 = 5 and n + 4 = 7. 3, 5, and 7 are three consecutive primes.
For n > 3, we have n = 3k or n = 3k + 1 or n = 3k + 2, with k > 1.
If n = 3k n no it would be
cousin then would be multiple of 3.
If n = 3k + 1, then n + 2 = 3k + 1 + 2 = 3k + 3 = 3(k + 1), we would have n + 2 not prime because it is
multiple of 3. If n = 3k + 2, then n + 4 = 3k + 2 + 4 = 3.(k + 2), we would have n + 4 not prime because it is
multiple of 3. Therefore, the only value of n is 3. Answer: 3.
(b) 197
Solution: 14 < √197 < 15. We should divide 197 by all primes less than or equal to 13.
Since 197 is not divisible by 2, 3, 5, 7, 11, 13, and 17. Therefore, 197 is prime.
(c) 239
239 is not divisible by 2, 3, 5, 7, 11, 13, and 17 (172 = 289). 239 is prime.
(d) 473
Solution: 473 is not divisible by 2, 3, 5, or 7. But it is divisible by 11. Therefore, 473 is not prime.
5040 2
2520 2
1260 2
630 2
315 3
105 3
35 5
7 7
5040 = 24 x 32 x 5 x 7
To find the gcd(a, b) and lcm(a, b) knowing a = 230 . 521 . 19 . 233 and b = 26 . 3 . 74 . 112 . 195 . 237
Solution: The gcd(a,b) is the product of the common factors with their lowest exponents.
Therefore, GCD(a, b) = 26 . 19 . 233. And the LCM(a, b) is the product of all the factors with their
highest exponents. Therefore, lcm(a, b) = 230.3.521.74.112.195.237 Answer: gcd(a, b) = 26.
19. 233 and lcm(a, b) = 230.3.521.74.112.195.237.
16–Verify that every pair between 4 and 100 is the sum of two primes:
Solution:
6=3+3 8=2+5 10 = 7 + 3 12 = 5 + 7 14 = 3 + 11
16 = 5 + 11 18 = 7 + 11 20 = 7 + 13 22 = 3 + 19 24 = 19 + 5
26 = 19 + 7 28 = 5 + 23 30 = 7 + 23 32 = 19 + 1334 = 29 + 5
36 = 29 + 7 38 = 31 + 7 40 = 29 + 1142 = 29 + 1344 = 13 + 31
46 = 29 + 1748 = 29 + 1950 = 19 + 3152 = 29 + 2354 = 23 + 31
56 = 53 + 3 68 = 61 + 7 60 = 53 + 7 62 = 19 + 4364 = 53 + 11
66 = 53 + 1358 = 53 + 5 70 = 47 + 2372 = 61 + 1174 = 61 + 13
76 = 53 + 2378 = 47 + 3180 = 61 + 1982 = 59 + 2384 = 71 + 13
86 = 83 + 3 88 = 83 + 5 90 = 83 + 7 92 = 61 + 3194 = 47 + 47
96 = 83 + 1398 = 61 + 37
17–Find the smallest positive integer n such that 2n2+ 29 is a composite integer.
Solution: it can be guaranteed that for n = 29, 2n2+ 29 is a composite number because: 2,292 + 29 =
29.(2.29 +1) = 29.59. It remains to verify if there exists any compound of the form 2n. 2+ 29 for n < 29.
The table below shows the values of 2n2+ 29 for 1 < n < 29.
1 2 3 4 5 6 7 8 9
2n2+29 31 33 35 37 39 41 43 45 47
n 10 11 12 13 14 15 16 17 18
2n2+29 49 51 53 55 57 59 61 63 65
n 19 20 21 22 23 24 25 26 27
2n2+29 751 829 911 997 1087 1181 1279 1381 1487
n 28 - - - - - - - -
2n2+29 1597 - - - - - - - -
Checking, through the process of division by primes, it is observed that all values of 2n2+ 1 is
cousins. Therefore, the smallest value of n for which 2n2+29 is prime and n = 29.
18–Show that the sum of consecutive odd positive integers is always a composite integer.
Solution: If the two are consecutive odd numbers, then they have the forms 2k + 1 and 2k + 3.
Thus, 2k + 1 + 2k + 3 = 4k + 4 = 4(k + 1). 4(k + 1) is a multiple of 4.
Therefore, the sum is a composite integer. Q.E.D.
19–Usando a decomposição canônica dos inteiros 507 e 1287, achar o mdc(507, 1287) e o mm(507, 1287).
Solution: The gcd is equal to the product of common factors with their lowest exponents and the lcm is the
product of all os factors with yours greater exponents.
Na decomposition we have: 507 = 3.132 e 1287 = 32.11.13
Resposta: mdc(507, 1287) = 3.13 = 39 e mmc(507, 1289) = 32.11.132 = 16731
20–Demonstrate that every prime, except 2 and 3, is of the form 6k–1 or 6k + 1, where k is a positive integer.
Solution: According to the division algorithm, any number when divided by 6 is one of the
ways:
6k 6k + 1 6k + 2 6k + 3 6k + 4 6k + 5.
For n = 6k , n é multiple of 6. No é cousin.
For n = 6k + 1, can be first.
For n = 6k + 2, n = 2(3k + 1)⇒ n is not a multiple of 2. 6k + 2 is not prime.
For n = 6k + 3, n = 3(2k + 1)⇒ n is a multiple of 3. 6k + 3 is not prime.
For n = 6k + 4, n = 2(3k + 2)⇒ n is not a multiple of 2. 6k + 4 is not prime.
For n = 6k + 5, n = 6k + 6–1 = 6(k + 1)– 1 = 6k’ –1. It can be prime.
Therefore, if n is not prime, it cannot be of the forms 6k, 6k + 2, 6k + 3, and 6k + 4.
Thus, n is prime for 6k–1 or 6k + 1. Q.E.D.
21–Find the smallest positive integer by which 3720 must be divided to obtain a perfect square.
Solution: Every perfect square has its prime factors raised to even exponents.
Decomposing 3720 we have: 3720 = 2^3 . 3 . 5 . 31. For the exponents of the factors to be
even numbers we must eliminate two, three, five, and thirty-one. Therefore, 3720 must be divided by
2.3.5.31 = 930.
22–Find all the prime divisors of 50!.
Solution: All integers from 1 to 50 appear in 50!, since 50! = 1.2.3.4.5....48.49.50!
Therefore, all os cousins inferior a 50 are divisors do 50!
2, 3, 5, 7, 9, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.
24–Show that every integer of the form n4+ 4, with n > 1 is composite.
Solution:
(1) If n is even, we have n = 2k⇒ (2k)4+ 4 = 16k4 + 4 = 4(4k4+ 1)⇒ n4+ 4 is a multiple of 4.
Therefore, it is composed.
(b) All whole yes form 3n + 2 they um factor cousin this shape.
If 3n + 2 is prime, its decomposition into prime factors is 3n + 2 = (3n + 2).1⇒ 3n + 2
there is a prime factor of the form 3n 2. +
If 3n + 2 is not prime, let 3n + 2 = a1.a2.a3...an its canonical decomposition into factors.
cousins. Since every integer has one of the forms 3k, 3k + 1, or 3k + 2, the factors ai of 3n
+ 2 cannot be in the form of 3k because 3k is a multiple of 3, therefore it will not be prime.
Thus, each ai can only take one of the forms 3k + 2 or 3k + 1.
If all forum yes form 3k + 1 we would have:
(3k + 1)(3k' + 1) = 9kk' + 3k + 3k' + 1 = 3.(3kk' + k + k') + 1 which is of the form 3n + 1. Therefore,
3n + 2 must admit at least 1 factor of the form 3n + 2.
Observing the table, either one of the forms p2 + 1 or p2 - 1 is always a multiple of 10. Q.E.D.
30–Verify that every integer can be written in the form 2^k*m, where the integer k > 0 and m is an odd integer.
Solution: If n é um whole odd it is done m = n e n = 20.m.
If n is an integer, then in its canonical decomposition we have, n = 2^k * a1^k1 * a2^k2 * a3^k3 .... * an^kn.
Only the factor 2 is an even prime. Thus, the product of all factors, except 2, is a number.
odd. Therefore, it is concluded: n = 2k.m. Q.E.D.
31 - Demonstrate that the positive integer a > 1 is a perfect square if and only if all the exponents of the factors
the prime factors of its canonical decomposition are even integers.
Solution: Let a be a perfect square then it has the form n². If n = n₁k₁.n₂k₂.n₃k₃. ... nₙkₙ,
where n1k1.n2k2.n3k3. ... nnkn is the canonical decomposition into prime factors of n, we will have n2 =
(n1k1.n2k2.n3k3. ... nnkn)2 = n12k1.n22k2.n32k3. ... nn2kn. As all the exponents are from
form 2k it is concluded that everyone os exponents they are pairs.
Let ni be a prime factor of n whose exponent is not even. In this case, the factor would have exponent
in the form 2k + 1. Now, ni2k + 1 = ni2k . ni. ni2k has an exponent, therefore it is in accordance with
What was said before. In order to be a square, it should have two equal prime factors.
Since neither is prime, this is not possible. Therefore, every number is a perfect square if and only if,
all the exponents of the prime factors in the canonical decomposition are even.
33–Demonstrate that if the integer n > 2, then there exists a prime p such that n < p < n!
Solution: We have 2.(n–1) = n + n–2 > n + 2–2 > n. Therefore, 2.(n–1) > n (1).
Since n!/[2(n–1)] = n(n–2)(n–3).....3, it follows that n! > 2.(n–1)(2).
From (1) and (2) we conclude that n! > 2.(n–1) > n. Now, for every n > 3, there exists something between n and 2(n–1).
at least one prime, according to Tschebischeff's proposition, we conclude that between n and n!
There exists a prime p. For n = 2, we have 2! = 4. We have 3 which is prime. Therefore, for n > 2, there exists
p is prime, such that n < p < n!. Q.E.D.
34–Demonstrate that every odd prime is of the form 4k + 1 or 4k - 1, where k is a positive integer.
Whatever integer n is, n = 4k, 4k + 1, 4k + 2 or 4k + 3.
If n is an odd prime, n cannot take one of the forms 4k and 4k + 2 because these are forms of
pairs. Thus, n can only be 4k + 1 or 4k + 4. For n = 4k + 3, we have n = 4k + 3 + 1 - 1 = 4(k +
-1 is of the form 4k - 1. Q.E.D.