# Something to pass the time

## Recommended Posts

The boards are quiet at the moment so I thought you might glad of something to exercise your little grey cells. When I was 17 I borrowed a maths book from the local library and in it was this simple question (posed by the speaker at a Royal Mathematical Society dinner)...

• What is the smallest integer that when the first digit is moved to the end, the new number is exactly one and a half times the original?
##### Share on other sites

I know that 17 is going to be important, but my brain blew up before I could get further. Not really seeing any shortcuts that could help... I'm thinking it's a big number.

##### Share on other sites

7 hours ago, requinix said:

I know that 17 is going to be important

Yes - so far so good....

##### Share on other sites

Alright, this one took me a while to remember how to do. It's part of a class of problems of manipulating one number's digits to come up with another number, and the work to solve it tends to have a common pattern.

Spoiler

Say the first number is A and made up of the digits a0a1a2...an (so it's n+1 digits long).
The second number is B and would thus be made up of the digits a1a2a3...ana0 (with the first digit of A moved to the end).

They share a common portion of a1a2a3...an (without that first/last digit that got moved around). Call the number that those digits creates C.
Now rephrase A to be a0 * 10^n + C (which puts a0 in the most-significant place and then adds C).
And similarly rephrase B to be C * 10 + a0 (moving C's digits over one position and then adding a0).

B = 1.5 * A, or without that annoying decimal, 2B = 3A.
Substituting the earlier equations, 2(10C + a0) = 3(a0 * 10^n + C),
or 20C + 2a0 = 3a0 * 10^n + 3C.

You can simplify a little by eliminating the 3C to get 17C + 2a0 = 3a0 * 10^n (that's the 17 I saw coming).
Rearrange to get C = (3a0 * 10^n - 2a0) / 17.

The smallest A is going to be where a0 = 1, thus simplify a little more to C = (3 * 10^n - 2) / 17.
(I don't remember why this is valid; n is pretty much fixed, just unknown, regardless of the value of a0. But you can try this with other a0s too.)

C must be a whole number, so the question is where to find a 3 * 10^n - 2 that is divisible by 17.
The simplest method is to just keep trying: 28/17, 298/17, 2998/17, 29998/17... but I think there's a shortcut here by recognizing that 17 is prime?

Eventually you find n=15 and 2999999999999998 / 17 = 176470588235294.

Thus A = 1176470588235294 and B = 1764705882352941.

##### Share on other sites

Well done - you get a cigar.

##### Share on other sites

For some reason that number has stuck in memory for for the last 58 years, which is strange as I sometimes struggle to recall my phone number (the one I never dial). On those occasions when I have doubted my recall I just use my calculator to divide 30 by 17 (which contains the answer as a recurring sequence) to verify.

* * * * *

Anyone up for another (simpler) one?

You have a solid wooden sphere and drill a vertical hole centrally through it.

The resulting object is now 6cm high. What is the volume remaining?

##### Share on other sites

Been a long time since I've done integrals, so I first tried the brute-force solution to make sure I had the right answer.

Spoiler

Volume by parts: need the volume of the sphere, the volume of the cylinder, and also the volume of the bits on top and bottom that were completely drilled away.

Sphere: 4/3 pi R^3 - where R is the radius of the sphere
Cylinder: pi r^2 h - where r is the radius of the cylinder/drill bit and h is the height
Top and bottom: 1/6 pi X (3r^2 + X^2) - where X is the height of the removed bit; this shape is called a "spherical cap" and yes, I did have to Google it

First problem is that X, but it's simple: the height of the whole sphere is 2R and is also 2X + 6. So X = R - 3.
Which gives 1/6 pi (R - 3) [3r^2 + (R - 3)^2]
-> 1/6 pi (R - 3) (3r^2 + R^2 - 6R + 9)
-> 1/6 pi [ (3R r^2 + R^3 - 6R^2 + 9R) - (9r^2 + 3R^2 - 18R + 27) ]
-> 1/6 pi (3R r^2 + R^3 - 9R^2 + 27R - 9r^2 - 27)
which could be simplified more but hold on.

So the volume of all the removed stuff is the cylinder's plus two of the cap's:
-> pi r^2 h + 2/6 pi (3R r^2 + R^3 - 9R^2 + 27R - 9r^2 - 27)
then substitute h = 6 and simplify,
-> 6 pi r^2 + pi (R r^2 - 3R^2 + 9R - 3r^2 - 9) + 1/3 pi R^3
-> pi (R r^2 - 3R^2 + 9R + 3r^2 - 9 + 1/3 R^3)

Scary. Take that volume away from the sphere to get what is remaining.
4/3 pi R^3 - pi (R r^2 - 3R^2 + 9R + 3r^2 - 9 + 1/3 R^3)
-> pi (R^3 - R r^2 + 3R^2 - 9R - 3r^2 + 9)

Now at this point I look at the parts and realize that it can be factored. I don't know how to explain that thought process, but there is a pattern to how factored groups get expanded that you learn to recognize. Red is factored, green is not.
-> pi [ (R + 3)(R^2 - r^2) - 9R + 9 ]

Not as scary as before, but still not the most fun thing ever.

But wait! Next, simplify even more by adding in the relationship between R and r: looking at the cylinder side-on, there's a triangle with R as the diagonal, r as one side, and 3 as another. Thus
r^2 + 9 = R^2
which you can also get if you see the triangle as 2R, 2r, and 6 instead. Rearranged,
R^2 - r^2 = 9

Oh hey, that term looks familiar, and it totally collapses the equation into something far more manageable:
-> pi [ (R + 3)(9) - 9R + 9 ]
-> pi (9R + 27 - 9R + 9)
-> 36 pi

That's the answer and it doesn't even have any variables in it. Which was subtly hinted at by the fact that the problem doesn't tell you R or r but does ask for the volume remaining - something you theoretically wouldn't have been able to know without those.
36 pi suggests it's 6^2 pi, but if you remember that the units are 6 cm then doing that would end up with a volume of 36 pi cm^2 which isn't right. So my guess is that "6 cm" was a convenient number (something math problems love to do) and the actual formula is closer to 1/6 h^3 pi (which would give the proper units of cm^3); the "1/6" is weird but sphere-math has lots of division by 3s so it's not an unreasonable guess.

With that out of the way, the integral. It's actually much easier regarding the sheer math work, but requires a little more thinking to get it.

Spoiler

Two reason why integrals:

1. So, so often, when dealing with a regular 3D object, you can do the math in 2D and then integrate it into the third dimension. A sphere and a cylinder are very much two regular objects.
2. Any time you have an equation based on a single variable which represents an "axis", an integral could be useful. It's basically the act of repeating that equation for all points along the axis, and it translates an X-dimensional system into an (X+1)-dimensional system.

The choice of axis is obvious: the Y/vertical axis. It suggests itself when you consider that the act of drilling down through the sphere is basically equivalent to "slice a horizontal piece of the sphere and put a hole into it" repeatedly.

What's the equation to be repeated? If I had a graphic it would be easier to explain, but I'm lazy. Using the above sentence as inspiration, the equation can be that of a horizontal slice of the sphere.
So forget "volume" for a second and focus on "area". The desired result for a slice of the sphere is the remaining area after the hole was drilled through. Which is actually really easy: the area of the whole slice minus the area of the drilled-out portion.
Which is pi S^2 - pi r^2 (where S=radius of the slice and r=radius of the drill bit/removed portion).

r is an unknown value, but it's a fixed value so leave it alone. However S is not a fixed value as it depends on which slice of the sphere you're taking: S=0 at the top, grows to some value (the radius of the sphere) in the middle, then back down to 0 at the bottom.
That's not going to be useable with an integral so it has to be expressed differently. And there's only one way to do that so it's useful: by expressing it in terms of the Y axis. Because the Y axis is the only other variable the integral can make use of. It is the variable it will use, even.

Insert another lack of graphic here.
Look at the sphere from the side (again), pick a slice to cut through it, and imagine a triangle with three points: the center of the sphere, the outer tip of the slice, and the "corner" between the two (which could be along the sphere's central line or its equator, same thing either way).
One edge of that triangle is the width of the slice (S) and another edge is the distance down into the sphere that you've drilled (call it "h"), and the diagonal is the radius of the sphere (R).
Thus R^2 = S^2 + h^2.

That makes the area of the remaining portion of the slice, after drilling, pi (R^2 - h^2) - pi r^2.

As in the other solution, R and r have a relationship of R^2 = r^2 + 9. Rearrange the area equation a little and suddenly things fall into place:
pi (R^2 - h^2) - pi r^2
-> pi (R^2 - r^2) - pi h^2
-> pi (9) - pi h^2

Integral along the Y axis, aka the "h" variable, gives 9 pi h - 1/3 pi h^3. Yeah, yeah, "plus C" but nobody cares about that (and besides, it'll cancel out later). This equation could be simplified a little but meh.

So now what? To actually get volume from this, you have to evaluate the integral along the "length" of the axis, which just means evaluating the integral at the beginning and end and taking the difference. And the beginning is the top and the end is the bottom, right?
Actually no. Remember that slice and triangle earlier that introduced "h"? That was based on the center of the sphere, which means the axis has to be defined according to that in order for everything to be consistent. Violate that - the coordinate system - and the various equations aren't compatible anymore.
Which means the top of the sphere (the beginning) has to be at h = 3 and the bottom of the sphere (the end) at h = -3.

The beginning of the integral is 9 pi 3 - 1/3 pi 3^3 = 27 pi - 9 pi = 18 pi.
The end of the integral is 9 pi (-3) - 1/3 pi (-3)^3 = -27 pi + 9 pi = -18 pi.

And the total is beginning minus end, which is 18 pi - (-18 pi) = 36 pi.

Fun fact: there were some shortcuts I didn't use here, and I'm horribly glossing over some details in mentioning them:
1. The sphere is two hemispheres on top of each other, and they are identical to each other. Could calculate the volume for just one and then double it.
2. Dealing with hemispheres means the "triangle was based on the center of the sphere" issue goes away and you can go back to saying that the center is h=3 again.
3. The remaining volume at the top and bottom is 0 so those parts of the integral work don't matter.

Thus you can do just 9 pi 3 - 1/3 pi 3^3 = 18 pi, then double it to get the final answer of 36 pi.

That's more interesting math than I've ever had to do as a (web) developer. Actually, with maybe one exception... but I don't remember quite what it was so whatever.

##### Share on other sites

I took the integration / volume of rotation route and came up with the solution.

Spoiler

When I passed the question to my friend (who, incidentally, has a PhD in Mathematics) he thought for a few seconds then said "36 pi. Consider the case where the diameter of the hole is zero".

In that case it simply becomes the volume of a 6cm diameter sphere. Doh!

##### Share on other sites

For anyone else out there, feel free to join in. Meanwhile...

Q3

Some animals are gathered in the forest having a midwinter party, all seated around a fire.  When the fire starts to die down they all move off to gather more wood.
The walrus manages to gather 7 twigs and throw them on the fire, the widgeon throws on 21 twigs, the wombat 11 twigs, the weasel 20 twigs and the wolverine throws on 28 twigs.
How much wood would a woodchuck chuck if a woodchuck would chuck wood?

##### Share on other sites

4 hours ago, Barand said:

I took the integration / volume of rotation route and came up with the solution.

Hide contents

When I passed the question to my friend (who, incidentally, has a PhD in Mathematics) he thought for a few seconds then said "36 pi. Consider the case where the diameter of the hole is zero".

In that case it simply becomes the volume of a 6cm diameter sphere. Doh!

I love shortcuts too but damn, that one is just plain annoying 😆

Ah, I envy that ability to think outside the box...

##### Share on other sites

Speaking of thinking outside the box,

56 minutes ago, Barand said:

Some animals are gathered in the forest having a midwinter party, all seated around a fire.  When the fire starts to die down they all move off to gather more wood.
The walrus manages to gather 7 twigs and throw them on the fire, the widgeon throws on 21 twigs, the wombat 11 twigs, the weasel 20 twigs and the wolverine throws on 28 twigs.
How much wood would a woodchuck chuck if a woodchuck would chuck wood?

Spoiler

Trick question: there is no woodchuck at the party.

##### Share on other sites

That wasn't thinking outside the box, that was a cop-out.

The  woodchuck was just slower than the others collecting his twigs. There is a (none-zero) solution.

##### Share on other sites

10 hours ago, Barand said:

That wasn't thinking outside the box, that was a cop-out.

Spoiler

because it's a mid-winter party and woodchucks hibernate during the winter.

10 hours ago, Barand said:

The  woodchuck was just slower than the others collecting his twigs. There is a (none-zero) solution.

Then I'm thinking 11 twigs.

##### Share on other sites

Welll done. I knew you'd do it.

Hint for others:

Spoiler
1. walrus = 7
2. widgeon = 21
3. wombat = 11
4. weasel = 20
5. wolverine = 28
Spoiler

Solution:

1) a + u = 7
2) e + i + o = 21
3) a + o = 11
4) a + 2e = 20
5) 2e + i + o = 28

Subtracting #2 from #5 we get e = 7
Substituting this value in #4
a + 14 = 20
a = 6
From #3 we now have
6 + o = 11
o = 5
From #1
6 + u = 7
u = 1
From #2
7 + i + 5 = 21
i = 9

Therefore woodchuck = 2o + u = 11

##### Share on other sites

'til now
they have been mathematical
so here's one
that's purely grammatical

Q4

Correctly punctuate this sentence so that it makes sense

##### Share on other sites

Is that missing one? The version I know has 11 "had"s. Though 10 works too, it's just changing which boy was correct.

There's also the classic "buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo" (needs punctuation and capitalization), but that can totally be stretched out further - like pretty easily to "buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo".

I should go looking for some puzzles too...

##### Share on other sites

Could swear I had a book with these sorts of puzzles but I can't find it.

So I'm looking through the internet for a good source to post - not original, but it is something - and I find this one:

Quote

Young Saul, a budding mathematician and printer, is making himself a fake ID. He needs it to say he’s 21. The problem is he’s not using a computer, but rather he has some symbols he’s bought from the store, and that’s it. He has one 1, one 5, one 6, one 7, and an unlimited supply of + – * / (the operations addition, subtraction, multiplication and division). Using each number exactly once (but you can use any number of +, any number of -, …) how can he get 21 from 1, 5, 6, 7?

Note: you can’t do things like 15+6 = 21. You have to use the four operations as ‘binary’ operations: ((1+5)*6)+7.

I can't solve it. Even ran a quick script to try every possible combination of ((# _ #) _ #) _ # and nothing works. So I'm figuring there must be some trick in the phrasing, except I'm not seeing a loophole in there: "each number exactly once" using the "binary operations" of "addition, subtraction, multiplication, and division". (And in fact, creating operators like negation and exponent still isn't enough to get a solution.)

Non-answer: if the goal is to be legally an adult then coming up with 22 would be fine too.

##### Share on other sites

22 is easy

(5 - 1) * 7 - 6

but wouldn't an id card that had an age entry like that look just a lttle suspicious? eg

Age : (5 - 1) * 7 - 6

I'll keep trying for 21.

Does this count?

7 * 6 * 1 * .5

##### Share on other sites

Nope, a decimal point counts as an operator (apparently). Supposedly it really is just the problem at face value: those four numbers, each used once, and as many add/subtract/multiply/divide operations (and parentheses) as you want.

The way that latter point is phrased is unusual. "Unlimited supply", but you'd only ever need three... So you'd think there's a trick there, but it specifically states you have to use them as binary operators.

##### Share on other sites

If you work in base 9 rather than base 10

1 + 5 + 7 + 6 = 21

##### Share on other sites

That answer also got shut down

I gave up and found the answer somewhere else and there is no trickery in the question after all.

Nested hints:

Spoiler

#1 The answer has the structure # _ (# _ (# _ #))

Spoiler

#2 If you made a list of the four operators in order of how likely you think they are to be used, you would be completely wrong

Spoiler

#3 The inner parenthesized result is not a whole number

Finally...

Spoiler

6 / (1 - (5/7));
-> 6 / (7-5)/7
-> 6 / (2/7)
-> 6 * 7 / 2
-> 21

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.