The two positive integers a, b with a> b are such that a% of b% of a and b% of a% of b differ by 0.003. Find all possible pairs (a, b).
There are four possible pairs: (5, 2), (5, 3), (6, 1) and (6, 5).

Since a and b are integers, we know a, b and a− b are all factors of 30.
Further, we know that a < 10, since if a ≥ 10 then one of b and a - b ≥ 5, which would make theproduct too big.
We also know that a (being the largest of the threenumbers a, b and a - b) must be greater than 301/3 > 271/3= 3.
Hence a, being a factor of 30 between 3 and 10, can only be 5 or 6.
If a = 5, then
b (5 − b) = 6
b2 − 5b + 6 = 0
(b − 2)(b − 3) = 0
b = 2 or b = 3
If instead a= 6, then
b (6 − b) = 5
b2 − 6b + 5 = 0
(b − 1)(b − 5) = 0
b = 1 or b = 5
Hence, in total, there are four possible pairs of (a, b): (5, 2), (5, 3), (6, 1) and (6, 5).
Preparing for the Junior Maths Challenge?
Join a free weekly live lesson where I solve real JMC-style problems, explain key methods, and share what to focus on in your weekly practice.
You can join live or watch the replay - everyone is welcome.
📅 Every Tuesday
⏰ 18:30–19:30 (UK time)
💻 Live session (link sent by email)

This course guides you through the fundamentals of Python programming using an interactive Python library known as Turtle.

This course encompasses a range of Geometry topics such as coordinate and spatial geometry, introductory trigonometry, angles, parallel lines, congruent and similar triangles, polygons, circles, the Pythagorean Theorem, and more. Emphasis will be placed on reinforcing Algebra skills and enhancing critical thinking through problem-solving in both mathematical and real-world contexts.

Ask about our courses and offerings, and we will help you choose what works best for you.