number theory
number theory
in
NUMBER THEORY
8. Prove that the sequence 2, 5, 8, 11, 14, 17, can never have a square
number.
Solution:
Given,
2, 5, 8, 11, 14, 17,.…
This is an AP with the first term a = 2 and common difference d = 5 – 2 = 3.
nth term of the given sequence is:
an = a + (n – 1) × d
an = 5 + (n – 1) × 3
= 5 + 3n – 3
= 3n + 2
∴ an = 3n + 2
Let p be a natural number, such that p2 = an
p2 = 3n + 2
3n = p2 – 2
n = (p2 – 2)/3
For any integer from 0 to 9 for p, n does not appear to be an integer.
Hence, the given sequence contains no perfect squares.
9. Find all primes that can be represented as sums and differences between
two primes.
Solution:
Let x be a prime that can be represented both as a sum and as a difference of 2
primes.
For the given statement, we must have x > 2.
∴ x is an odd prime number.
Also, one of those prime numbers must be 2.
That means we must have x = y + 2 = z – 2, where y and z are prime numbers.
So, z = x + 2 and y = z + 2
Thus, we can say that x, y and z will be three consecutive odd primes.
As we know, there is only one such set of prime numbers, and they are 3, 5,
and 7.
x=5=3+2=7–2
Hence, there is only one prime number i.e 5 can be represented as sums and
differences between two primes.
12. Use the definition of prime at the beginning of the section to show that 4
and 6 are not prime. Why is any number that has more than two positive
factors not prime?
A prime number is defined as a positive integer greater than 1 that has exactly
two distinct positive factors: 1 and itself.
4 has the factors 1, 2, and 4 → More than two factors → Not prime
6 has the factors 1, 2, 3, and 6 → More than two factors → Not prime
Any number with more than two distinct positive factors is not prime because,
by definition, a prime number must have exactly two factors.
13. Do there exist integers a and b such that a + b = 544 and whose greatest
common divisor is 11?
Let a=11x and b=11y. Then:
11x+11y=544
11(x+y) =544
x+y = 544/11
=49.45
Since x+y must be an integer, no such integers a and b exist.
16. Show that 3k + 4 and 4k + 5 never have a common factor greater than 1.
Let d be a common divisor of 3k+4 and 4k+5. Then d must divide their linear
combination:
(4k+5) −(3k+4) =k+1
3(4k+5) −4(3k+4) =15
Thus, d must divide 15. The possible values for d are 1,3,5, or 15.
If d>1, then d divides k+1, meaning k ≡ −1mod d.
Substituting this into 3k+4, we get 3(−1)+4=1, implying d=1.
Thus, the only common divisor is 1.
20. Find the smallest integer n for which 10x + 11y = n has exactly 9 solutions
in positive integers x, y.
To count solutions, rewrite:
n=10x+11y
To find solutions in Z+, we solve:
n−10∈Z+/11
For fixed n, let x range over all possible values so that y remains positive.
Since the equation is linear in two variables, the number of solutions equals:
n/gcd(10,11)
Since gcd(10,11)=1, the number of solutions is:
n/10n
Setting this equal to 9:
n/10=9⇒n=90
Thus, the smallest n is 90.
21.What is 7777 + 1 in base 8?
22. You ask your cyborg friend what it would like to eat. It replies “48,879”.
Knowing that your cyborg friend thinks in hexidecimal but speaks indecimal,
what should you feed it?
Solution: It’s first useful to compute some powers of 16; 162 = 256, 163 = 4096,
and 164 = 69632. Notice that this last power of 16 is larger than the given
number, so we’ll only need 4 hexidecimal digits. The largest multiple of 4096
that can be subtracted from 48869 is 11, which in hexidecimal is B. This leaves
3823. The largest multiple of 256 which can be subtracted from this is 14, or E,
which leaves 239. Continuing this, we find that out cyborg friend asked for
“BEEF”.
24.Three integers (x, y, z) satisfy 34x + 51y = 6z. If y and z are primes, what
are these numbers?
Solution: Writing 17(2x + 3y) = 6z shows that z is divisible by 17. Because z is a
prime, we must have z = 17. We can now divide the whole expression by 17 to
get 2x+3y = 6. Writing this as 3y = 2(3−x) shows that y is divisible by 2. Because
y is a prime, y = 2. Finally, x = 0.
Solution:
Every other integer is divisible by 2. Every third integer is
divisible by 3. And similarly, every kth integer is divisible by k. In other
words, between two consecutive multiples of k there are exactly k − 1
integers which are not divisible by k. Suppose that we have a product
of k consecutive integers, none of which are divisible by k. This would
imply that between two consecutive multiples of k there were at least
k integers not divisible by k. This is a contradiction, because there are
only k − 1 such numbers. So any product of k consecutive integers is
divisible by k because one of these integers is a multiple of k.
31. If n is any integer, prove that n 2+n is always divisible by 2, that n 3−n is
always divisible by 3, and that n 5 − 5n 3 + 4n is always divisible by 5. For a
given prime number, p, can you find a polynomial expression like these that is
always divisible by p?
Solution:
If we factor each of these polynomials we find,
n 2 + n = n(n + 1)
n 3 − n = n(n 2 − 1) = (n − 1)n(n + 1)
n 5 − 5n 3 + 4n = n(n 2 − 1)(n 2 − 4) = (n − 2)(n − 1)n(n + 1)(n + 2)
So these polynomials represent the products of 2, 3, and 5 consecutive
integers, respectively. So by the previous problem, they are divisible by 2, 3,
and 5 respectively, whenever n is an integer. These factorizations suggest a way
to produce a polynomial which is divisible by any particular prime p when n is
an integer. Every prime > 2 is an odd number, p = 2m + 1. So we can form the
polynomial
f(n) = (n − m). . .(n − 1)n(n + 1). . .(n + m)
= n(n 2 − 1)(n 2 − 4). . .(n 2 − m2 )
= n 2m+1 − (1 + . . . + m2 )n 2m + . . . + (m!)2n
40. Prove that there is no triangular number which is one less than a multiple
of 11.
A triangular number is of the form:
Tn=n(n+1)/2
We need:
Tn+1≡0 (mod11)
n(n+1)/2+1≡0 (mod11)
Multiplying by 2:
n(n+1)+2≡0(mod11)
n(n+1)≡−2(mod11)
Testing all values n=0,1,2,…,10, none satisfy n(n+1)≡−2(mod11) , proving no
such triangular number exists.
For n≥5 n! grows quickly, and since n! ≡ 0(mod5)for n≥5, we get n!+3≡3(mod5),
which is never a perfect square.
Thus, the only solutions are:
(n,m)=(0,2),(1,2),(3,3)
43. Let d be any positive integer not equal to 2, 5, or 13. Show that one can
find distinct a, b in the set {2, 5, 13, d} such that ab − 1 is not a perfect square.
Consider all possible products:
2×5−1=9, 2×13−1=25, 5×13−1=64
which are perfect squares. Now, if d≠2,5,13, we pick a=d and check:
d×2−1, d×5−1, d×13−1
For most d, one of these is not a perfect square (since most numbers are not
squares).
Thus, there always exists a pair (a,b) where ab-1 is not a perfect square.
45. The integers a, b and c are the sides of a right-angled triangle. Prove that
abc is a multiple of 60.
Since a2+b2=c2, we analyze the divisibility conditions:
1. One of a, b is even ⇒ is divisible by 2.
2. One of a, b, c is a multiple of 3 (since any square is 0,1,4 (mod 3)).
3. One of a, b, c is a multiple of 5 (similarly, squares modulo 5 are 0,1,4).
Since 2,3,5 are all factors, abc is a multiple of 2×3×5=60.
47. Let n be a positive integer and let a1, a2, a3, . . . , ak (k ≥ 2) be distinct
integers in the set {1, 2, . . . , n} such that n divides ai(ai+1 − 1) for i = 1, 2, . . . , k
− 1. Prove that n does not divide ak (a1 − 1).
Given n∣ai(ai+1−1), we assume for contradiction:
n∣ak(a1−1)
Since all previous terms satisfy n∣ai(ai+1−1), their product is also divisible by n.
This would imply:
n∣a1(a2−1)⋅a2(a3−1)⋯ak−1(ak−1)ak(a1−1)
which contradicts distinctness unless n divides some ai, contradicting the
problem conditions.
Thus, n does not divide ak(a1−1).
49. For any positive integer n, prove that 98n − 68n − 31n is always one less
than a multiple of 2010.
We analyze:
98n−68n−31n≡−1(mod2010).
Since 2010=2×3×5×67, we check modulo each factor:
1. Modulo 2:
o 98≡068≡0, 31≡1(mod 2)
o 98n−68n−31n≡0−0−1≡−1(mod 2)
2. Modulo 3:
o 98≡2, 68≡268 ≡2, 31≡1(mod 3)
o 98n≡2n , 68n≡2n, 31n≡1n≡1(mod 3).
o 2n−2n−1≡−1(mod3).
3. Modulo 5:
o 98≡3, 68≡368 ≡3, 31≡1(mod 5).
o 3n−3n−1≡−1(mod5)
4. Modulo 67:
o 98≡−1, 68≡168 ≡1, 31≡−1(mod 67)
o (−1)n−1n−(−1)n=−1−1+1=−1(mod 67)
Since all modular checks show −1-1−1, we conclude:
98n−68n−31n≡−1(mod2010).
Thus, it is one less than a multiple of 2010.
50. Find one pair of positive integers a and b such that:
• ab(a + b) is not divisible by 7; • (a + b) 7 − a 7 − b 7 is divisible by 77.
We analyze the second condition:
(a+b)7−a7−b7
By the Freshman’s dream theorem modulo 7,
(a+b)7≡a7+b7(mod 7)
Thus, (a+b)7−a7−b7≡0(mod 7)
For divisibility by 11, we use the binomial expansion:
(a+b)7=a7+7a6b+21a5b2+⋯+b7.
Modulo 11, since 7≡−47 and 21≡−1
(a+b)7−a7−b7≡−4a6b−a5b2(mod11)
We need this to be 0 (mod 11), so we choose a ,b such that
a6b+a5b2≡0(mod11).
Choosing a=3,b=5 , we verify that:
ab(a+b)=3×5×8=120, not divisible by 7.
(a+b)7−a7−b7 is divisible by 77.
Thus, (a,b)=(3,5) is a valid solution.
Cross-multiplying:
5(5b+10a)=3(5ab)
25b+50a=15ab
Rewriting:
15ab−25b−50a=0
Factoring:
(15a−25)(b−10)=250
Solving integer solutions gives (a,b)=(5,10).
56. Find all integers m, n such that m2 + 4n and n 2 + 4m are both squares.
Rewriting:
m2+4n=x2, n2+4m=y2
Trying small values,
m=1,n=1⇒12+4(1)=5 (not square)
57. Show that in every primitive Pythagorean triple (all three numbers don’t
have common factor), exactly one of the numbers is even, exactly one of the
numbers is divisible by 3 and exactly one of the numbers is divisible by 5.
Using standard Pythagorean triple formula,
(a,b,c)=(m2−n2,2mn,m2+n2)
One of m2−n2 or 2mn is even.
One of m2−n2,2mn,m2+n2 must be ≡0(mod3).
One of the three must be ≡0(mod 5)
Thus, the property holds.
58. If a, b, c are all positive integers, is it possible for a 2 + b + c, b 2 + c + a and
c 2 + a + b to all be perfect squares?
We need to determine if there exist positive integers a,b,c such that:
a2+b+c=x2
b2+c+a=y2
c2+a+b=z2
for some integers x,y,z.
Step 1: Consider Parity (Modulo 2 Analysis)
Each equation contains a squared term plus two linear terms. Since squares are
always 000 or 111 modulo 4, checking the cases leads to contradictions for
small values.
Step 2: Check Small Cases
Trying small values such as a=b=c=1,2, we find contradictions where the left-
hand sides are never perfect squares.
Step 3: Growth Rate Analysis
For large values of a, b, c , the squared terms dominate. If these were perfect
squares, their differences would have to be small, which is not possible due to
the quadratic growth rate.
Thus, no such integers exist.
which implies
ab>ba.
Thus, ab is always larger than ba for a>b>2.
62. In how many ways can 1 be expressed as the sum of the reciprocals of
three positive integers?
Solve:
1 1 1
+ + =1
a b c
Step 1: Factorization
Rewriting the equation,
n2(m−1)=(m−1)(m4+m3+m2+m+1)
Since m−1 cancels,
n2=m4+m3+m2+m+1
Checking for squares shows no integer solutions.
65. Let p > 2 be prime and n, x be positive integers. Suppose x − 1 has exactly
a factors of p in its prime factorization, and n has exactly b factors of p
where a ≥ 1 and b ≥ 0. Prove that x n − 1 has exactly a + b factors of p in it.
Given that x−1 has exactly a factors of p in its prime factorization, and n has
exactly b factors of p, prove that xn−1 has exactly a+ b factors of p.
Step 1: Rewrite Using Orders of Powers
We express xn−1 using the difference of powers:
xn−1=(x−1)(xn−1+xn−2+⋯+1)
69. Show that every prime not equal to 2 or 5 divides infinitely many of the
numbers 1, 11, 111, 1111, etc.
Solution:
The given sequence consists of numbers of the form:
10 k−1
N k= 9
for k≥1
Since p≠2,5, we know that p does not divide 10. By Fermat’s theorem,
10p−1≡1 mod p
Thus,
10p−1−1≡0 mod p
which means N p−1 is divisible by p. Similarly, for multiples of p−1 ,is also
divisible by p. This shows that infinitely many terms in the sequence are
divisible by p.
Answer: Every prime p≠2,5 divides infinitely many numbers in the sequence.
76. Prove that if a number is divisible by 7 that the sum of its base 8 digits is
also divisible by 7.
Let N be a number in base 8, represented as:
N=ak8k+ak−18 k−1+⋯+a181+a080,
where ai are the digits in base 8 (0≤ai≤7).
We need to show that if 7 divides N, then it also divides the sum S of its base 8
digits:
S=ak+ak−1+⋯+a1+a0
Step 1: Consider 8kmod 78^k \mod 78kmod7
Since 8≡1(mod7), raising 8 to any power gives:
8k≡1k≡1(mod7).
Thus, each term in the expansion of N simplifies modulo 7 as:
N≡ak+ak−1+⋯+a1+a0(mod7)
Step 2: Conclude the Proof
Since N≡S(mod7), if N is divisible by 7, then S must also be divisible by 7.
77. Using the result of number 75, show that the number 10 201 is not
divisible by 7.
The sum of the digits of (23731)8
S=2+3+7+3+1=16
Now, check divisibility by 7:
16÷7=2 remainder 2
Since 16 is not divisible by 7, based on number 75. 10,201is not divisible by 7.
✅ Final Answer: 10,201 is not divisible by 7.
78. Prove that if gcd(a, b) = 1 and gcd(a, c) = 1, then gcd (a, bc) = 1.
Step 1: Definition of GCD
We are given:
gcd (a,b)=1 and gcd (a,c)=1
This means that a shares no common factors with b and no common factors
with c, except 1.
Step 2: Consider Any Common Factor of a and bc
Let d be any common divisor of a and bc. Then:
d∣a and d∣bc
Since d divides the product bc, it must divide either b or c (or both).
Step 3: Use Given Information
Since gcd(a,b)=1, the only factors aaa and bbb share are ±1\pm 1±1.
Similarly, since gcd(a,c)=1, the only factors a and c share are ±1\pm 1±1.
This means d cannot be any number other than 1.
Thus, gcd (a,bc)=1, proving the result.
79. Use the Euclidean Algorithm to find the gcd of 324 and 129.
We apply the Euclidean Algorithm, which repeatedly finds remainders:
gcd(324,129)
Step 1: Divide 324 by 129
324÷129=2remainder 324−2(129)=66.324
gcd(324,129)=gcd(129,66).
Step 2: Divide 129 by 66
129÷66=1remainder 129−1(66)=63
gcd(129,66)=gcd(66,63)
Step 3: Divide 66 by 63
66÷63=1remainder 66−1(63)=3
gcd(66,63)=gcd(63,3)
Step 4: Divide 63 by 3
63÷3=21remainder 0..
Since the remainder is 0, we conclude:
gcd (324,129)=3
80. Hence show that 324x + 129y = 12 has a solution and find both a
particular solution and the general solution.
We use the Extended Euclidean Algorithm to express 3 as a linear combination
of 324 and 129.
From our Euclidean Algorithm steps:
1. 3=66−1(63).
2. Substitute 63=129−1(66):
3=66−1(129−1(66))=2(66)−1(129).
3. Substitute 66=324−2(129):
3=2(324−2(129))−1(129).
3=2(324)−4(129)−1(129)
3=2(324)−5(129)
Thus, a particular solution to 324x+129y=3 is:
x=2,y=−5
Since we need 324x+129y=12, we multiply by 4:
x=2(4)=8,y=−5(4)=−20
So, a particular solution is:
(x,y)=(8,−20).
General Solution
Since the general solution follows the form:
x=8+43t, y=−20−108t, for t∈Z,
129 324/¿
where 43= 3 and 108= 3 ¿.
82. Given that the integers m and n are such that 3│(m 2 + n 2 ), prove that
3│m and 3│n.
2q2=p2
Step 2: Consider Modulo 3
By part (a), if p2≡0(mod3). So p is divisible by 3.
Let p=3kp, then:
(3k)2=9k2=2q2.(3k)^2 = 9k^2 = 2q^2.(3k)2=9k2=2q2.
Dividing by 3:
2q2
3k2= 3
✅ Hence√ , 2 is irrational.
84. Write 457128 as a product of primes.
We find the prime factorization of 457128 using division:
1. Divide by 2:
457128÷2=228564
2. Divide by 2 again:
228564÷2=114282
3. Divide by 2 again:
114282÷2=57141
4. Sum of digits of 57141:
5+7+1+4+1=18(divisible by 3)
5. Divide by 3:
57141÷3=19047
6. Sum of digits of 19047:
1+9+0+4+7=21(divisible by 3)
7. Divide by 3 again:
19047÷3=6349
8. Check for divisibility of 6349:
o Not divisible by 2, 3, or 5.
o Check divisibility by 7:
6349÷7=907
9. Check if 907 is prime:
o Not divisible by 2, 3, 5, 7.
o Try 13:
907÷13=69.77(not an integer)
o Check 17:
907÷17=53.907
✅ Final Factorization:
457128=23×32×7×17×53
87- 88
a) Find the general solution for the following system of congruences.
N ≡ 3 (mod 11)
N ≡ 4 (mod 9)
N ≡ 0 (mod 7)
95. Find all sequences of hundred consecutive positive integers which contain
25 primes.
From the Prime Number Theorem, the expected number of primes in a
sequence of 100 numbers is about 21. Finding a sequence with exactly 25
primes requires careful placement to avoid multiples of small primes while
maximizing prime candidates. Sequences with such properties can be found
around values like k≈210m for integers m, where k avoids divisibility by small
primes.
97. Find all numbers p such that all six numbers p, p+2, p+6, p+8, p+12,
andp+14 are primes.
We check small prime candidates systematically.
If p=5, then the sequence 5,7,11,13,17,19consists entirely of primes.
Checking larger values like p=11, p=17p = 17, etc., often results in at least
one composite number.
Thus, the only solution is p=5.
98. Convert the decimal number 51966 to base 16.
To convert 51966 to base 16, divide it repeatedly by 16 and record the
remainders:
51966÷16=3247 remainder 14(E)
3247 3247÷16=202 remainder 15(F)
202÷16=12 remainder 10(A)
12÷16=0 remainder 12(C)
Reading from bottom to top, 5196610 =CAFE16.
99. Find gcd (901,612)using the Euclidean algorithm
Use the division algorithm iteratively:
901=612×1+289
612=289×2+34
289=34×8+17
34=17×2+0
Since the remainder is now 0, the greatest common divisor is:
gcd(901,612)=17
100. Solve 9x≡3(mod15)
Find gcd(9,15)=3. Since 3 divides 3, we divide through by 3:
3x≡1(mod5)
The modular inverse of 3 modulo 5 is 2 since 3×2≡1(mod5). Multiplying both
sides by 2:
x≡2(mod5)
General solution:
x=2+5k, k∈Z
101. Solve the system of linear congruences x ≡ 1(mod 3); x ≡ 2(mod 5); x ≡
3(mod 7).
We will solve the system of linear congruences:
x≡1(mod3)
x≡2(mod5)
x≡3(mod7)
Step 1: Solve the first two congruences
We start with:
x≡1(mod3)
x≡2(mod5)x
Using the general form x=3k+1, we substitute into the second congruence:
3k+1≡2(mod5)
Rearrange:
3k≡1(mod5)
Now, we solve for k. We find the modular inverse of 3 modulo 5. Since
3−1≡2(mod5) (because 3×2=6≡1(mod5), we multiply both sides by 2:
k≡2×1≡2(mod5)
Thus, k=5m+2 for some integer mmm, and substituting back:
x=3(5m+2)+1=15m+6+1=15m+7
So,
x≡7(mod15)
Step 2: Solve with the third congruence
Now we solve:
x≡7(mod15)
x≡3(mod7)
Substituting x=15m+7 into the third congruence:
15m+7≡3(mod7)
Since 15≡1(mod7), we simplify:
m+7≡3(mod7)
m≡−4≡3(mod7)