Miscellaneous Problems Involving Integers

Miscellaneous Problems Involving Integers 43 299 Problem If 62ab427 is a multiple of 99, find the digits a and b. 300 Problem Shew that an integer is divisible by 2 n , n = 1, 2, 3, . . . if the number formed by its last n digits is divisible by 2 n . 301 Problem Find the last digit of 2333333334 · 9987737 + 12 · 21327 + 12123 · 99987. 302 Problem AIME 1994 The increasing sequence 3 , 15, 24, 48, . . . , consists of all those multiples of 3 which are one less than a square. Find the remainder when the 1994th term is divided by 1000. 303 Problem AIME 1983 Let a n = 6 n + 8 n . Find the remainder when a 83 is divided by 49 . 304 Problem Shew that if 9 |a 3 + b 3 + c 3 , then 3 |abc, for the integers a,b,c.

3.7 Miscellaneous Problems Involving Integers

Recall that TxU is the unique integer satisfying x − 1 TxU ≤ x 3.4 Thus TxU is x is an integer, or the integer just to the left of x if x is not an integer. For example T3.9U = 1, T−3.1U = −4. Let p be a prime and n a positive integer. In the product n = 1 · 2 · 3···n the number of factors contributing a factor of of p is T n p U the number of factors contributing a factor of p 2 is T n p 2 U, etc.. This proves the following theorem. 305 Theorem De Polignac-Legendre The highest power of a prime p diving n is given by ∞ X k=1 T n p k U 3.5 306 Example How many zeroes are there at the end of 999 = 1 · 2 · 3 · 4···998 · 999? Solution: The number of zeroes is determined by the highest power of 10 dividing 999. As there are fewer multiples of 5 amongst {1,2,...,999} that multiples of 2, the number of zeroes is the determined by the highest power of 5 dividing 999. But the highest power of 5 dividing 999 is given by T 999 5 U + T 999 5 2 U + T 999 5 3 U + T 999 5 4 U = 199 + 39 + 7 + 1 = 246. Therefore 999 ends in 246 zeroes. 307 Example Let m , n be non-negative integers. Prove that m + n mn is an integer . 3.6 Solution: Let p be a prime and k a positive integer. By the De Polignac-Legendre Theorem, it suffices to shew that T m + n p k U ≥ T m p k U + T n p k U. This inequality in turn will follow from the inequality T α U + T β U ≤ T α + β U 3.7 which we will shew valid for all real numbers α , β . Adding the inequalities T α U ≤ α , T β U ≤ β , we obtain T α U + T β U ≤ α + β . Since T α U + T β U is an integer less than or equal to α + β , it must be less than or equal than the integral part of α + β , that is T α U + T β U ≤ T α + β U, as we wanted to shew. Observe that m + n = mm + 1m + 2 ···m + n. Thus cancelling a factor of m, m + n mn = m + 1m + 2 ···m + n n 44 Chapter 3 we see that the product of n consecutive positive integers is divisible by n. If all the integers are negative, we may factor out a −1 n , or if they include 0, their product is 0. This gives the following theorem. 308 Theorem The product of n consecutive integers is divisible by n. 309 Example Prove that n 5 − 5n 3 + 4n is always divisible by 120 for all integers n. Solution: We have n 5 − 5n 3 + 4n = nn 2 − 4n 2 − 1 = n − 2n − 1nn + 1n + 2 , the product of 5 consecutive integers and hence divisible by 5 = 120 . 310 Example Let A be a positive integer and let A ′ be the resulting integer after a specific permutation of the digits of A. Shew that if A + A ′ = 10 10 then A s divisible by 10. Solution: Clearly, A and A ′ must have 10 digits each. Put A = a 10 a 9 a 8 . . . a 1 and A ′ = b 10 b 9 b 8 . . . b 1 , where a k , b k , k = 1, 2, . . . , 10 are the digits of A and A ′ respectively. As A + A ′ = 10000000000, we must have a 1 + b 1 = a 2 + b 2 = ··· = a i + b i = 0 and a i+1 + b i+1 = 10 , a i+2 + b i+2 = ··· = a 10 + b 10 = 9 , for some subindex i , 0 ≤ i ≤ 9. Notice that if i = 9 there are no sums a i+2 + b i+2 , a i+3 + b i+3 , . . . and if i = 0 there are no sums a 1 + b 1 , . . . , a i + b i . Adding, a 1 + b 1 + a 2 + b 2 + ··· + a i + b i + a i+1 + b i+1 + ··· + a 10 + b 10 = 10 + 99 − i . If i is even, 10 + 99 − i is odd and if i is odd 10 + 99 − i is even. As a 1 + a 2 + ··· + a 10 = b 1 + b 2 + ··· + b 10 , we have a 1 + b 1 + a 2 + b 2 + ··· + a i + b i + a i+1 + b i+1 + ··· + a 10 + b 10 = 2a 1 + a 2 + ··· + a 10 , an even integer. We gather that i is odd, which entails that a 1 = b 1 = 0 , that is , A and A ′ are both divisible by 10. 311 Example Putnam 1956 Prove that every positive integer has a multiple whose decimal representation involves all 10 digits. Solution: Let n be an arbitrary positive integer with k digits. Let m = 1234567890 · 10 k+1 . Then all of the n consecutive integers m + 1 , m + 2, . . ., m + n begin with 1234567890 and one of them is divisible by n. 312 Example Putnam 1966 Let 0 a 1 a 2 . . . a mn+1 be mn + 1 integers. Prove that you can find either m + 1 of them no one of which divides any other, or n + 1 of them, each dividing the following. Solution: Let, for each 1 ≤ k ≤ mn + 1,n k denote the length of the longest chain, starting with a k and each dividing the following one, that can be selected from a k , a k+1 , . . . , a mn+1 . If no n k is greater than n, then the are at least m + 1 n k ’s that are the same. However, the integers a k corresponding to these n k ’s cannot divide each other, because a k |a l implies that n k ≥ n l + 1 . Miscellaneous Problems Involving Integers 45 313 Theorem If k |n then f k | f n . Proof Letting s = kn ,t = n in the identity f s+t = f s−1 f t + f s f t+1 we obtain f k+1n = f kn+n = f n−1 f kn + f n f kn+1 . It is clear that if f n | f kn then f n | f k+1n . Since f n | f n ·1 , the assertion follows. 314 Example Prove that if p is an odd prime and if a b = 1 + 1 2 + ···+ 1p − 1, then p divides a. Solution: Arrange the sum as 1 + 1 p − 1 + 1 2 + 1 p − 2 + ··· + 1 p − 1 2 + 1 p + 1 2 . After summing consecutive pairs, the numerator of the resulting fractions is p. Each term in the denominator is p. Since p is a prime, the p on the numerator will not be thus cancelled out. 315 Example The sum of some positive integers is 1996. What is their maximum product? Solution: We are given some positive integers a 1 , a 2 , . . . , a n with a 1 + a 2 + ··· + a n = 1996 . To maximise a 1 a 2 ··· a n , none of the a k ’s can be 1. Let us shew that to maximise this product, we make as many possible a k = 3 and at most two a j = 2 . Suppose that a j 4. Substituting a j by the two terms a j − 3 and 3 the sum is not changed, but the product increases since a j 3a j − 3 . Thus the a k ’s must equal 2, 3 or 4. But 2 + 2 + 2 = 3 + 3 and 2 × 2 × 2 3 × 3, thus if there are more than two 2’s we may substitute them by 3’s. As 1996 = 3665 + 1 = 3664 + 4 , the maximum product sought is 3 664 × 4. 316 Example Find all the positive integers of the form r + 1 r , where r is a rational number. Solution: We will shew that the expression r + 1 r is a positive integer only if r = 1, in which case r + 1r = 2. Let r + 1 r = k , k a positive integer. Then r = k ± √ k 2 − 4 2 . Since k is an integer, r will be an integer if and only k 2 − 4 is a square of the same parity as k. Now, if k ≥ 3, k − 1 2 k 2 − 4 k 2 , that is, k 2 − 4 is strictly between two consecutive squares and so it cannot be itself a square. If k = 1 , p k 2 − 4 is not a real number. If k = 2 , k 2 − 4 = 0. Therefore, r + 1 r = 2, that is, r = 1. This finishes the proof. 317 Example For how many integers n in {1,2,3,...,100} is the tens digit of n 2 odd? Solution: In the subset {1,2,...10} there are only two values of n 4 and 6 for which the digits of the tens of n 2 is odd. Now, the tens digit of n + 10 2 = n 2 + 20n + 100 has the same parity as the tens digit of n 2 . Thus there are only 20 n for which the prescribed condition is verified. 46 Chapter 3 Practice 318 Problem Find the sum 5 + 55 + 555 + ··· + 5... 5 |{z} n 5′ s . 319 Problem Shew that for all numbers a 6= 0,a 6= ±i √ 3 the following formula of Reyley 1825 holds. a = a 6 + 45a 5 − 81a 2 + 27 6aa 2 + 3 2 3 + −a 2 + 30a 2 − 9 6aa 2 + 3 3 + −6a 3 + 18a a 2 + 3 2 3 . If a is rational this shews that every rational number is expressible as the sum of the cubes of three rational numbers. 320 Problem What is the largest power of 7 that divides 1000? 321 Problem Demonstrate that for all integer values n, n 9 − 6n 7 + 9n 5 − 4n 3 is divisible by 8640. 322 Problem Prove that if n 4 is composite, then n divides n − 1. 323 Problem Find all real numbers satisfying the equation Tx 2 − x − 2 U = TxU. 324 Problem Solve the equation T x 1999 U = T x 2000 U 325 Problem Putnam 1948 Let n be a positive integer. Prove that T √ n + √ n + 1 U = T √ 4n + 2 U Hint: Prove that √ 4n + 1 √ n + √ n + 1 √ 4n + 3. Argue that neither 4n + 2 nor 4n + 3 are perfect squares. 326 Problem Prove that 6 |n 3 − n, for all integers n. 327 Problem Polish Mathematical Olympiad Prove that if n is an even natural number, then the number 13 n + 6 is divisible by 7. 328 Problem Find, with proof, the unique square which is the product of four consecutive odd numbers. 329 Problem Putnam 1989 How many primes amongst the positive integers, written as usual in base-ten are such that their digits are alternating 1’s and 0’s, beginning and ending in 1? 330 Problem Let a , b, c be the lengths of the sides of a triangle. Shew that 3ab + bc + ca ≤ a + b + c 2 ≤ 4ab + bc + ca. 331 Problem Let k ≥ 2 be an integer. Shew that if n is a positive integer, then n k can be represented as the sum of n successive odd numbers. 332 Problem IMO 1979 If a , b are natural numbers such that a b = 1 − 1 2 + 1 3 − 1 4 + ··· − 1 1318 + 1 1319 , prove that 1979 |a. 333 Problem Polish Mathematical Olympiad A triangular number is one of the form 1 + 2 + . . . + n, n ∈ N. Prove that none of the digits 2,4,7,9 can be the last digit of a triangular number. 334 Problem Demonstrate that there are infinitely many square triangular numbers. 335 Problem Putnam 1975 Supposing that an integer n is the sum of two triangular numbers, n = a 2 + a 2 + b 2 + b 2 , write 4n + 1 as the sum of two squares, 4n + 1 = x 2 + y 2 where x and y are expressed in terms of a and b. Conversely, shew that if 4n + 1 = x 2 + y 2 , then n is the sum of two triangular numbers. 336 Problem Polish Mathematical Olympiad Prove that amongst ten successive natural numbers, there are always at least one and at most four numbers that are not divisible by any of the numbers 2 , 3, 5, 7. 337 Problem Are there five consecutive positive integers such that the sum of the first four, each raised to the fourth power, equals the fifth raised to the fourth power? 338 Problem Prove that 2m3n m 2 n 3 is always an integer. 339 Problem Prove that for n ∈ N, n is divisible by n n−1 340 Problem Olimpíada matemática española, 1985 If n is a positive integer, prove that n + 1n + 2 ··· 2n is divisible by 2 n . Chapter 4 Sums, Products, and Recursions

4.1 Telescopic cancellation