PWC 143 task 2 involves stealthy numbers.
A positive integer n is stealthy, if there exist positive integers a, b, c, d such that a * b = c * d = n and a + b = c + d + 1.
The stealthy numbers less than 100 are: 4, 12, 24, 36, 40, 60, 72 and 84. Looking further ahead it appears likely that there is an infinite number of such numbers.
Some stealthy numbers have more than one solution for a + b = c + d + 1, for example:
n = 7200
72 + 100 = 75 + 96 + 1
75 + 96 = 80 + 90 + 1
n = 2520
35 + 72 = 36 + 70 + 1
40 + 63 = 42 + 60 + 1
42 + 60 = 45 + 56 + 1
Consider a + b = c + d + 1.
Clearly either a + b or c + d must be an odd number, since they differ by 1. If a is odd, b must be even (so that a + b is odd), and c and d must either be both odd or both even (so that c + d is even).
But we can rule out c + d being both odd, because c * d would then be odd and a * b would be even, so they cannot both equal n as is required.
So, of a, b, c and d, one must be odd and the other 3 must be even. We know that n = a * b = c * d, and either a * b or c * d is the product of two even numbers - two multiples of 2 - so n must be a multiple of 4.
No comments:
Post a Comment