Monday, December 02, 2019

Books: Math Recreations (Kraitchik) Part 2

I have more old math books than I'll ever read or need. This is just a fact. I would collect them, and sometimes read through parts of them, but never finish any of them. ...

Day 2: Chapter 3 -- Numerical Pastimes

Number puzzles can get repetitive quickly if interesting twists aren't added -- but at the same time, those twists shouldn't make the problem impossible to work out on paper.

Some of the problems in this chapter are easy with a calculator instead of paper and ridiculously easy with a spreadsheet or the Internet at hand.

Take a problem like this one:

Find a four-digit number in the form a a b b that is a perfect square.

Once upon a time, you might have had to start squaring a bunch of two-digit numbers to find the correct answer, or analyze a lot of four-digit numbers to find one that had a rational square root. I could use a spreadsheet in two minutes, and possibly refine it to just show what I wanted with a few minutes more.

But that's no fun.

Knowing that brute force was always a fall-back, we can narrow down the possibilities. For one thing, squaring a number means that the final digit must be 0, 1, 4, 5, or 6. We can eliminate numbers ending in 22, 33, 77, 88 or 99. And 00 isn't possible because no single digit squared becomes a two-digit number consisting of the same digit repeated. (Those pairs are all multiples of 11, a prime number, and not perfect squares.)

Likewise, we can skip 55 because all results from (10N + 5)2 end in 25, not 55.

So we could just square root 1111, 2211, 3311, 4411, etc., until we find it or until we have to move onto 44 and 66. There are only 27 combinations to try.

Don't ask me why, but 11 didn't seem likely to me, so I started with 44 instead. Gut instinct? Pattern recognition that I can't explain?


If you follow that up with, "Okay, same problem but with A A A B B B instead!", it might be less fun to do.


Another problem, with several answers, was along these lines:

Find a six-digit number ABCDEF, which is a perfect square AND ABC + 1 = DEF.

Again, I took the spreadsheet approach:
  • A1: Row() + 100
  • B1: =A1 * 1000
  • C1: =B1 + A1 + 1
  • D1: =C1 ^ .5

Additionally, you could have a conditional in the E column to tell you if you have a whole number in column D to make the visual inspection easier.
Copy this line and paste it down to row 898.

Doing this is brute force because we know that none of the answers ending in 3, 7, 8 or 9 will work. Forty per cent of the spreadsheet we know will fail, but it's quicker to calculate that extraneous information than to just check "good" numbers individually.

One benefit of this approach is that you can alter the columns to explore other ideas, like

  • What if DEF is double of ABC? (No need to look beyond 499.)
  • What if DEF is half of ABC? (The odd rows will be useless.)

And it isn't a difficult modification to switch to 8 digits.


SCALES OF NOTATION

A couple of observations to start:
The number 121 is a perfect square in any base, B > 2.
The number 1331 is a perfect cube in any base, B > 3.
The number 14661 is a perfect 4th power in any base, B > 6.

This Pascal triangle allusion is courtesy of the fact that whatever base B is:
B2 + 2 B + 1 = (B + 1)2
B3 + 3 B2 + 3 B + 1 = (B + 1)3
B4 + 4 B3 + 6 B2 + 4 B + 1 = (B + 1)4


Moving on ...

If you wanted to have a set of weights for a balance scale that could measure up to 40 pounds (or kilos, if you metrics prefer), how would you do it?
A quick answer is convert to powers of two, because binary is such an easy solution: 1, 2, 4, 8, 16, and 32. Five weights are needed.
But there is a better solution, using powers of 3: 1, 3, 9 and 27. Only four weights are needed.
This is because you can add to both sides of the balance: if an object is 2 pounds, it will be lighter than 3, but you can put 1 more with the object. So 3 - 1 gives 2.
So an object of 16 pounds can be found if the 27 and 1 are put on one side and the 9 and 3 on the other: 27 + 1 - 9 - 3 = 16.

There was a long proof in the book that gets into "why are you doing that" territory, but I believe it's just showing that 4 weights is the least you can deal with, and is certainly better than 40 1-pound weights.


The amusing part of this section was looking at notation like 1 + x + x2 + x3 + ... + + xn = (xn+1 - 1) / (x - 1)>
I have to remind myself that I just did that in a comic using repeated 9's.

The funny thing is that I didn't think about what that meant for the sum of sequences.
I knew that 1 + 2 + 4 + 8 + 16 = 31, which is 32 - 1, which is (16)(2) - 1, because it's binary, and I have a long history dealing with binary.

But it doesn't naturally occur to me that 1 + 3 + 9 + 27 = ((27)(3) - 1) / (3 - 1) = 80 / 2 = 40. Good to know.

So how much is 5 + 25 + 125 + 625?

No comments:

Post a Comment