September 2008
—————————
The Math Corner in this month's diary included the following brainteasers.
[1] Take some whole number of more than one digit; e.g. the three-digit number 183. First double your number: 366. Now reverse your number's digits: 381. What is the absolute difference of those last two numbers (i.e. the bigger minus the smaller)? It's 15. Question: How small can this difference be? Can it ever be zero? If so, find an instance. If not, explain why not.
[2] One of Jonah's Timewasters, posted a while ago, was Drifts. A reader tells me the scoring system goes as follows: "You get more points the more balls you pick up, with 1 point for 3 greens, 5 for four greens, 11 for five, 17 for six, 25 for seven, etc. (The next few terms, for eight, nine, ten, … greens, are: 33, 41, 51, 61, 73, 85, 97, 111, 125, 141, 157, 173, 191, 209, 229, 249, 269, 291, 313, 337, 361, 385, 411, …) Once you get past that inital jump of 4 points (from 1 point for 3 greens to 5 points for 4), the jumps in number of points go: 6, 6, 8, 8, 8, 10, 10, 12, 12, 12, 14, 14, 16, 16, 16, …" Question: How many points do you get for n balls?
—————————
Solutions
For the first, just note that if the last digit of the difference is to be zero, the first digit has to be double the last digit — which means larger than the last digit. But if the first digit is larger than the last digit, then reversing the digits gives you a number smaller than the starting number … and therefore less than half the value of double the starting number …
In fact the smallest difference is 1, given by any starting number with the form 3xxxxx7, where "xxxxx" is a string of nines of any length, including zero length. Any number with the form 2xxxxx5, "xxxxx" as before, gives a difference of 2.
For the second, use the common notation [x] for the largest integer not greater than x. The quotient and remainder on division by 5 are then expressible as [n/5] and n – 5×[n/5] respectively. I'll just abbreviate those things to q and r here, though if you want to see the formula in its full glory you can of course substitute the full terms as I just wrote them.
Then I make the answer 10q2 + 4qr + 10q + 4r – 9 – 2×[(r+4)/5].
For n = 29, for example, we have q = 5, r = 4, and [(r+4)/5] = [1.6] = 1, so the formula gives 250+80+50+16-9-2, which is 385. Check.
For n = 30 we have q = 6, r = 0, and [(r+4)/5] = [0.8] = 0, so the formula gives 360+0+60+0-9-0, which is 411. Check.