Number Theory Worksheet 2 – Diophantine Equations 1. Using algebra, find all pairs of positive integers such that both their sum and product are 19. 4 2 1 2. [Source: UKMT Mentoring] Find all integer solutions to ππ + π + π = 1. 3. [Source: SMC] For how many integer values of n does the equation x2 + nx − 16 = 0 have integer solutions? π−1 4. [Source: SMC] Find all the values of π for which both π and 4π+1 are integers. 5. For what real values of π₯ is π₯ 2 − 2π₯ − 2 a perfect square? (i.e. a square number) 6. Each of Paul and Jenny has a whole number of pounds. He says to her “If you give me £3, I will have π times as much as you”. She says to him: “If you give me £π, I will have 3 times as much as you. Give that all these statements are true and that π is a positive integer, what are the possible values for π? 7. [Source: Frosty Special] Find the first five triangular numbers that are perfect squares. 8. Prove that: a. √4π2 + 1 can never be an integer if π is an integer. b. And hence √π₯ − √π₯ is never an integer when π₯ is an integer. (Tip: For equations involving surds, isolate the surd on one side of the equation then square both sides.) www.drfrostmaths.com/rzc Number Theory Worksheet 2 – Diophantine Equations - ANSWERS 1. Using algebra, find all pairs of positive integers such that their sum and product add up to 19. Let our two numbers be π and π, and without loss of generality (w.l.o.g.) let π ≥ π. Using the information, ππ + π + π = 19. Factorising, (π + 1)(π + 1) − 1 = 19, so (π + 1)(π + 1) = 20. The possible factor pairs of 20 are 20 × 1, 10 × 2, 5 × 4 (we needn’t consider negative factors in this particular case, because they’ll lead to negative π and π). This leads to solutions (9,1) and (4,3). 2. Find all integer solutions to 3. [Source: SMC] For how many integer values of n does the equation ππ + ππ − ππ = π have integer solutions? (Official UKMT solution) For the equation to have integer solutions, it must be possible to write π₯ 2 + ππ₯ − 16 in the form (x − α) (x − β), where α and β are integers. Therefore π₯ 2 + ππ₯ − 16 = π₯ 2 − (πΌ + π½)π₯ + πΌπ½ and we require that πΌπ½ = −16. The possible integer values of α, β are 1,−16; −1, 16; 2, −8; −2, 8; 4, –4 (we do not count −16, 1 as being distinct from 1, −16, for instance). As n = −(α + β), the possible values of n are 15, −15, 6, −6 and 0. 4. Find all the values of π for which both π and ππ+π are integers. π π π + + = π. π π 4 + 2π + π = ππ ππ − 2π − π = 4 (π − 2)(π − 1) − 2 = 4 (π − 2)(π − 1) = 6 Thus we try each of the factor pairs of 6, i.e. -1 and -6, -2 and -3, etc. Thus yields pairs of solutions for π and π of (1, −5), (0, −2), (−1, −1), (−4,0), (3,7), (4,4), (5,3), (8, 2). But we discard any where π or π is 0 since we can’t divide by 0 in the original equation. ππ π−π π−1 1 π−1 2 π+1 4π+1 is an integer whenever the power is a multiple of , including 0. So let 2π−2 2π+2 4 4 1 = π. Then 2 rearranging, π = = − =2− . π+1 π+1 π+1 π+1 The only numbers which divide 4 are -4, -2, -1, 1, 2, 4. This gives values for π of −5, −3, −2, 0, 1, 3. However if π = 0 we’d have a negative value of π. Thus π = −5, −3, −2, 1, 3. 5. For what integer values of π is ππ − ππ − π a perfect square? (i.e. a square number) π₯ 2 − 2π₯ − 2 = π 2 (π₯ − 1)2 − 3 = π 2 (π₯ − 1)2 − π 2 = 3 (π₯ + π − 1)(π₯ − π − 1) = 3 Note π > 0, although π₯ may be negative. The only factor pairs of 3 we need to consider are 3 × 1 and −1 × −3 (since we know π₯ + π − 1 > π₯ − π − 1. These gives solutions for π₯ of 3 and -1. So there was indeed a negative solution! 6. Each of Paul and Jenny has a whole number of pounds. He says to her “If you give me £3, I will have π times as much as you”. She says to him: “If you give me £π, I will have 3 times as much as you. Give that all these statements are true and that π is a positive integer, what are the possible values for π? Using the information provided, our equations are: π + 3 = π(π − 3) (1) π + π = 3(π − π) (2) As per the advice in the lecture slides, if we have three variables, we could use substitution to get a single equation in terms of two variables. Substituting either π or π doesn’t yield nice equations we www.drfrostmaths.com/rzc can factorise, but it works if we eliminate π: π = ππ − 3π − 3 (ππππ (1)) 4π + π π= (ππππ (2)) 3 4π + π = ππ − 3π − 3 3 3ππ − 13π − π = 9 9ππ − 39π − 3π = 27 (3π − 1)(3π − 13) = 40 Now we consider the factor pairs of 40. Only four lead to integer values for π and π. For example, using 3π − 1 = 2 and 3π − 13 = 20, we get π = 1, π = 11. Using our equation above to get π, we get four possible solutions: (π, π, π) = (1,11,5), (2,7,5), (3, 6,6), (7, 5, 11) 7. Find the first five triangular numbers that are perfect squares. 1 The nth triangular number is the sum of the first n integers, with the formula π(π + 1). Therefore 2 1 2 π(π + 1) = π 2 for some π, and thus π(π + 1) = 2π 2 . As discussed in the lecture slides, π and π + 1 are coprime, and thus either π is a square and π + 1 is twice a square, or π + 1 is a square and π is twice a square. It’s then simply a case of listing out the square numbers, and seeing which we can either add or subtract one and then half to get a square number (we need only try odd square numbers, since for even ones, adding or subtracting one gives an odd number, which can’t be halved). We find this happens for 1 (since half of 2 is a square), 9 (8 is twice a square), 49 (50 is twice a square) 1 and 289 (288 is twice a square). Then using π(π + 1) with π = 1, 8, 49, 288, we get square 2 triangular numbers of 1, 36, 1225 and 41616. Side note: I presumed I wasn’t the first person who wondered whether there were square triangular numbers, so a quick Googling revealed that the problem was studied by Euler, who produced a formula for generating these numbers, among more general problems. His method involved using a suitable substitution to yield the Diophantine equation π₯ 2 − 2π¦ 2 = 1, which is Pell’s equation. See http://en.wikipedia.org/wiki/Square_triangular_number for more details. 8. Prove that: a. √πππ + π can never be an integer if π is an integer. Informally, we could argue that 4π2 is a square number (as √4π2 = 2π), and one more than a square number is not going to be square itself. We could prove this by showing that the difference between two square numbers is always greater than 1: (π + 1)2 − π2 = 2π + 1. When π ≥ 1, 2π + 1 > 1. Thus there can be no two adjacent square numbers. Note that if we consider 0 a square number, then the above expression would give a square. b. And hence √π − √π is never an integer when π is an integer. Suppose, as a proof by contradiction, that √π₯ − √π₯ = π where π is a positive integer. Then π₯ − √π₯ = π 2 . Isolate the √π₯ on one side of the equation so that we can cleanly square again: π₯ − π2 = √π₯. So π₯ 2 − 2π₯π2 + π4 = π₯. Putting this in quadratic form: π₯ 2 + (−2π2 − 1)π₯ + π4 = 0 Using the quadratic formula: π₯ = 2n2 +1±√4π2 +1 2 Thus π₯ can’t possibly be an integer, because √4π2 + 1 is not an integer. www.drfrostmaths.com/rzc