PROBLEMS I TO BE HANDED IN BY FRIDAY 5TH FEBRUARY 2016 1. (i) Prove that for every natural number n > 2, one has (n + 1) | (n3 + 1). (ii) Suppose that n is a natural number exceeding 1. Prove that (n2 − 1) | (n3 + 1) if and only if n = 2. 2. (i) Let a and b be integers. Show that 11 | (100a + b) if and only if 11 | (a + b), and hence deduce that an integer n is divisible by 11 if and only if the sum of its base-100 digits is divisible by 11. (ii) Let the conventional base 10 expansion of the integer n be nk nk−1 . . . n1 n0 , so that n = 10k nk + 10k−1 nk−1 + . . . + n0 . Let m be the integer with base 10 expansion nk nk−1 . . . n1 , so that m = 10k−1 nk + 10k−2 nk−1 + . . . + n1 . Show that 2n (and hence also n) is divisible by 19 if and only if m + 2n0 is divisible by 19, thereby providing a test for divisibility by 19. 3. (i) Let n > 2 be a natural number. Prove that (n! − 1, (n − 1)! − 1) = 1. n (ii) By considering the binomial coefficient , prove that the product of k k consecutive integers is always divisible by k!. 4. (i) Apply the Euclidean algorithm to determine (3990, 2016); (ii) Find integers x and y such that 3990x + 2016y = (3990, 2016). 5. Let n be a natural number and p be a prime number. (i) Show that for each h ∈ N, the number of integers m, with 1 6 m 6 n, n divisible by ph is equal to , where bθc denotes the largest integer not ph exceeding θ (the integer part of θ). (ii) Hence deduce that the power of p dividing n! is pep , where ep < n/(p − 1). 6∗ [Hard]. Let 1 < a1 < · · · < ak < 2n be integers not dividing each other. Show that k 6 n. Prove that if k = n and m is the integer satisfying 3m < 2n < 3m+1 then a1 > 2m . [Hint: Write each integer ai in the form (2b + 1)2c . In the second part write a1 = (2m1 + 1)2r and investigate how many numbers ai must be of the form (2m1 + 1)2c 3d .] 7 [just for fun]. (i) Implement the Euclidean Algorithm in your favourite computer language (preferably one that can handle large integers, such as Python, java, PARI/GP, or C with the GMP library). 1 2 PROBLEMS I (ii) How large can you take the inputs before it takes a noticeable amount of time to compute the answer? (Obviously this is subjective. To fix ideas, let’s say that anything longer than one second is noticeable.) (iii) Compare the speed of your implementation to the built-in one if your language has one. If the built-in implementation is significantly faster, investigate why. [Hint: google ‘binary GCD algorithm’.] (iv) It is known that the average number of divisions in the Euclidean Algorithm when run on randomly chosen numbers with B binary digits is asymptotic to 12( logπ 2 )2 B for large B. (Here log denotes the natural logarithm.) Have your implementation count the number of divisions performed, and compute the average over many random trials of 1000-bit numbers. Use this to compute an estimate for π (assuming a precomputed value for log 2). c Andrew R. Booker, University of Bristol 2016. This material is copyright of Andrew R. Booker at the University of Bristol unless explicitly stated otherwise. It is provided exclusively for educational purposes at the University of Bristol, and is to be downloaded or copied for your private study only.