Solution of the Week #485 - Best Bet

You’d be forgiven for thinking 3 would be the best choice, as a third of three digit numbers are divisible by 3, however any number that isn’t a multiple of 3 can’t be rearranged to become one.

In fact of the 6^3=216 possible rolls, 72, exactly a third, are a multiple of 3.

For 5, all you would need is for at least one of the rolls to be a 5, and for you to place that at the end of the number. There are 91/216, around 42% would win for you, so a better bet than 3.

However there is only one choice of ‘n’ that gives you a better than evens chance of winning the bet, and that is 7. Of the 216 rolls, 126 are, or can be rearranged to form, a multiple of 7, giving you a win percentage of over 58%.

Listed below are all of the possible winning numbers. Any with three different digits can be rolled in six different ways, and any with a repeated digit, in three ways:

112  126  133  154  161  224  231  245  252  266  315  322

336  343  364  413  434  441  455  462  511  525  532  546

553  616  623  644  651  665

 

And below in the winning percentage for the first few odd primes (a composite number couldn’t be the best bet as will always be at least equalled by its prime factors) :

 

3      33.3%

5      42.1%

7      58.3%

11     22.2%

13     36.1%

17     23.6%

19     26.4%

23     16.7%

 

 

Solution of the Week #484 - Twin Numbers

Consider three types of digit:

A=odd = 1,3,5,7,9

B=even but not divisible by 4 = 2,6

C=divisible by 4 = 4,8

For the three digit number to be divisible by 4, it is sufficient that the number formed by the final two digits is divisible by 4. So if it ends on a C digit the middle digit has to be even (B or C), but if it ends on a B digit the middle digit must be odd (A).

So we must end with AB, BC or CC.

The possible arrangements with at least one odd digit are therefore:

AAB

BAB

CAB

ABC

ACC

A number of the form of ABC can be rearranged to one of the form CAB and vice versa. For each of the other cases, simply swap the position of the two digits of the same type to find the alternative number. For example 128 pairs with 812, 132 with 312, 216 with 612, and 748 pairs with 784.

Solution of the Week #483 - Trailing Zeroes

The number of trailing zeroes is determined by how many time the number is divisible by 10, which in turn is determined by how many times the number is divisible by 2 and how many times it is divisible by 5, with the lesser of those determining how many times the number is divisible by 10.

The number we seek will be made up of 2, 3, 5 and 7, each raised to a different power. Let’s call them 2^a*3^b*5^c*7^d

For instance, to satisfy the first part, b, c and d need to be even and a needs to odd, so that when the number is multiplied by 2, all four powers will be even, and the number will be a perfect square.

From the second part, a, c and d need to be divisible by 3, and b needs to be one less than a multiple of 3.

From the third part, a, b and d need to be divisible by 5, and c needs to be one less than a multiple of 5.

From the last part, a, b and c need to be divisible by 7, and d needs to be one less than a multiple of 7.

For the trailing zeroes we are only interested in the values of a and c.

a is an odd number that is divisible by 3, 5 and 7. The smallest such number is 3*5*7=105.

c is divisible by 2, 3 and 7, and one less than a multiple of 5. 2*3*7 = 42. So c needs to be a multiple of 42. 84 is 42*2 and one less than a multiple of 5, so therefore c=84.

The lesser of 105 and 84 is 84, so therefore the number has 84 trailing zeroes.

If you’re interested the values of b and d would be 140 and 90 respectively. The result is a number with 234 digits, the last 84 of which are indeed all 0.

Solution of the Week #482 - Number Triangle 2

As an aside, the ‘couple of observations’ I referred to are: that the 15 must be on the bottom row, since it can’t be the difference between any other two numbers in the range; and that you only have to define the numbers on the bottom row, and the rest of the grid is defined, at which point you just need to check for duplicates. (This give (14!/10!)*5/2 = 60060 possibilities).

Wherever we have the top and one of the other numbers in a mini triangle, the other number could be the sum (unless it’s over 15) or the difference of the given two, unless the top number is greater, in which case it must be the sum.

Therefore you can place the 14 and the 9 straight away.

On the face of it the number completing the 7,8 triangle could be 1 or 15, however as we have observed the 15 must be on the bottom row, so it must be the 1.

‘e’ might be 13 or 15. ‘a’ could be 3 or 11.

‘c’ will either be 4 or 12, depending on what ‘a’ turns out to be, however since 4 is already taken, c must be 12 and a must be 11.

If e was 13, f would be 1, however, since we’ve already used 1, e must be 15, and f must be 3.

Finally b must be 2, d is 10 (since 14 is already taken), and g must be 13.

In case you’re interested, this 15 cell triangle is the largest than can exist with each number the difference of the two below.

Solution of the Week #479 - 100 Card Shuffle

You can split the question into two parts: that the subsequent four cards will all be greater than 34, and that those four cards will be in ascending order.

The probability that the second card is greater than 34 is 66/99, then subsequent cards have a probability of 65/98, 64/97 and 63/96.

A lot of factors cancel, leaving an overall probability of 130/679 that the other four cards will be greater than the first.

Secondly, those four cards can be in any one of 4! Orders, only 1 of which is ascending, giving a factor of 1/24.

Combining these two probabilities we get an overall probability of 65/8148, which is about 1 in 125. Interestingly, this is slightly less than the probability if we were unaware of the number of the first card, which of course is 1 in 120.

Solution of the Week #474 - The Search for Seven

For the GCD to be 7, a necessary condition is that the two numbers are divisible by 7. This of course means that not only are abc and cba divisible by 7, but so is abc-cba.

abc = 100a+10b+c and cba = 100c+10b+a, so their difference is 99a-99c, or 99(a-c).

Since 99 is not a multiple of 7, (a-c) must be, so a and c must differ by 7 (they can’t be identical, since the GCD of aba and aba is aba).

Since they are single digits, they could only be: (0,7), (1,8) or (2,9).

For each case we can find the middle digit or digits b that makes abc (and therefore also cba) a multiple of 7.

This leads us to 007,700; 077,770; 168,861; and 259,952.

We can rule out 007,700 and 077,770 on the basis that 007 and 077 are not three-digit numbers.

The third pair 168 and 861 are also both divisible by 3 and therefore have a GCD of 21.

The final pair of 259 and 952 are therefore the numbers we are looking for. 259 = 7x37 and 952 = 7x8x17.

 

Solution of the Week #473 - Always a Multiple

(a^7)*b-a*(b^7)

Let’s start by plugging a couple of numbers into the expression. When a,b is 2,1 it computes to 126, and when a,b is 3,1 it computes to 2184. These two numbers have a GCD of 42, so we have an upper bound, but will the expression ALWAYS come out to a multiple of 42 for any integers a,b? 42 is 2x3x7, so we can separately look at whether the expression is always a multiple of 2,3 and 7.

To help us we can factorise the expression thusly:

ab(a^6-b^6)

difference of squares

ab(a^3+b^3)(a^3-b^3)

sum/difference of cubes:

ab(a+b)(a-b)(a^2+ab+b^2)(a^2-ab+b^2)

Unfortunately we can’t break it down any further than that.

Looking at whether the expression is always even is straightforward. If either a or b is even then the whole expression will be, but if they’re both odd, the term (a-b) will be even.

As to divisibility by 3, again if either a or b is, then the whole thing is. If a and b have the same remainder after dividing by 3, then (a-b) will be divisible by 3, and if they differ (1 and 2), then (a+b) will be divisible by 3.

Finally looking at divisibility by 7 is a bit more complicated.

We can make a table of all of the possibilities of remainders after dividing by 7 (the modulo), to see what we can determine:

As before if either a or b is 0, the whole expression is divisible by 7, and also if a=b or if a+b=7 (using the (a-b) and (a+b) factors).

Unfortunately for the remaining cases we need to use the messier factors. Lets assume b=1 and let a=2,3,4,5:

(a^2+a+1)=7,13,21,31 and (a^2-a+1)=1,7,13,21

So between the two factors one will always be divisible by 7 if b=1. That just places four more xs into the grid. However, since the expressions are symmetrical with respect to a and b, we can also put xs in the column where a=1. Also since the two factors differ only in the sign of the middle term, we can regard b=6 as b=-1, and a=6 as a=-1 and check off those cases too:

Finally allowing b=2 and a=3,4

(a^2+2a+4)=19,28 and (a^2-2a+4)=7,12

We can place xs in the remaining spots in row b=2, and by symmetry, the other six spots too.

So therefore (a^7)*b-a*(b^7) is always divisible by 2,3 and 7, and so the ultimate answer is 42.

Solution of the Week #472 - Triangle Area

If you add more squares to form a repeated tiling, it becomes clear that the area of the triangle is half that of the blue square. The area of the blue square is the sum of the areas of the two original squares, by Pythagoras, so therefore the area of the red triangle is the mean average of the area of the two original squares.

Solution of the Week #470 - Word List

They can all be followed by a pair of consecutive letters of the alphabet to form a six-letter word:

SCARAB     THOUGH     NAPALM     SOLEMN     TECHNO     DOLLOP     DIVERS     DIVEST     GALAXY

They are placed in order according to the letters that have been added.

Of the four words in the second list, one can also be followed by a pair of consecutive letters: PARA -> PARADE, and therefore belongs between SCAR and THOU in the list.

The other three could be followed by a pair of consecutive letters in reverse order: BECKON, CLEFTS, PASTED.

Solution of the Week #469 - Temperature Teaser

Both scales are linear, so we can (mentally) draw straight lines between the data points given in the question, but we currently have two lines to think about, the Fahrenheit and Celsius. However since we are only interested in the point where they are positive and negative by the exact same amount, we can think of a single line which is the average of the two (or the sum of the two would also work), and find the point where it equals 0.

So we have 16 for the first data point and -40 for the second. If we mentally split that into seven ‘chunks’ of 8 degrees each, we can see that we want to be 2 chunks away from the point where Celsius is 0, where 7 chunks would get all the way to -40. So Celsius will be 2/7 * -40, or -80/7, which is -11 3/7 degrees. Predictably, at that point, Fahrenheit will be 11 3/7 degrees.

Solution of the Week #467 - Sequence

One part is obvious: that the initial digit increases with each term, so the missing term will start with a 6. The other part is that the product of the digits of each number is the same number but with the initial digit omitted, eg 4x3x8x4=384. Specifically each term is the smallest it could be (excluding the use of 0). So the missing term will be 612.

11, 236, 315, 4384, 5175, 612, 7735, 8128, 9135