Number Theory Worksheet 2 – Diophantine Equations

  1. Using algebra, find all pairs of positive integers such that both their sum and product are 19.
  2. [Source: UKMT Mentoring] Find all integer solutions to .
  3. [Source: SMC] For how many integer values of n does the equation x2 + nx − 16 = 0 have integer solutions?
  4. [Source: SMC] Find all the values of for which both and are integers.
  5. For what real values of is 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:
  9. can never be an integer if is an integer.
  10. 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.)

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, .
    Factorising, , so .
    The possible factor pairs of 20 are , , (we needn’t consider negative factors in this particular case, because they’ll lead to negative and ). This leads to solutions and .
  2. Find all integer solutions to .
    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 . But we discard any where or is 0 since we can’t divide by 0 in the original equation.
  1. [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 in the form(x − α) (x − β), where α and β are integers. Therefore and we require that . 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.
  2. Find all the values of for which both and are integers.
    is an integer whenever the power is a multiple of , including 0. So let . Then rearranging, .
    The only numbers which divide 4 are -4, -2, -1, 1, 2, 4. This gives values for of . However if we’d have a negative value of . Thus .
  3. For what integer values of is a perfect square? (i.e. a square number)
    Note , although may be negative. The only factor pairs of 3 we need to consider are and (since we know . These gives solutions for of 3 and -1. So there was indeed a negative solution!
  1. 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:
    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 can factorise, but it works if we eliminate :
    Now we consider the factor pairs of . Only four lead to integer values for and . For example, using and , we get , .
    Using our equation above to get , we get four possible solutions:
  2. Find the first five triangular numbers that are perfect squares.
    The nth triangular number is the sum of the first n integers, with the formula . Therefore for some , and thus . As discussed in the lecture slides, and are coprime, and thus either is a square and is twice a square, or 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) and 289 (288 is twice a square). Then using with , we get square triangular numbers of and .
    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 , which is Pell’s equation. See for more details.
  3. Prove that:
  4. can never be an integer if is an integer.
    Informally, we could argue that is a square number (as), 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: . When , . 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.
  5. And hence is never an integer when is an integer.
    Suppose, as a proof by contradiction, that where is a positive integer. Then .
    Isolate the on one side of the equation so that we can cleanly square again: . So .
    Putting this in quadratic form:
    Using the quadratic formula:
    Thus can’t possibly be an integer, because is not an integer.