Enigma 1729

Spoiler for New Scientist Enigma 1729: “Xmas Gifts” (Follow the link to see the puzzle.)

This one took me ages to figure out, partly due to a stupid mistake that had me thinking the puzzle had no solution, but it turns out not to be too bad.

If XMAS is 34 and GIFTS is 34 then XMASGIFTS is 68.

But if ARE = ORIENT then A = OINT, and if OF = ORIENT then F = RIENT. That means XMOINTSGIRIENTTS = 68. The smallest value for XMOINTSGIRIENTTS results when the letters that occur 3 times (I and T) are 1 and 2, the letters that occur 2 times (N and S) are 3 and 4, and the remaining 6 letters are 5 through 10… and that smallest value is 68. Any other possibility result in a larger sum. So I and T are 1 and 2; N and S are 3 and 4; E, G, M, O, R, and X are 5 to 10; and any letter other than these must be 11 or larger.

Now A = OINT and the largest value this can have is 10+2+4+1 = 17. But also ARE = THREE which means A = THE, and the smallest value this can have is 1+11+5 = 17. Therefore A = 17, and T, H and E must have their smallest possible values (1, 11 and 5) while O and N have their largest possible values (10 and 4). I then must be 2 and S must be 3.

XMAS = 34 then means XM = 14. Each of X and M must be 6, 7, 8, or 9, but the only way to get XM = 14 is X = 6, M = 8 or vice versa. Since X and M occur nowhere else in the puzzle we can’t resolve this ambiguity, but we don’t need to to get the ANSWER.

That leaves 7 and 9 for R and G.  Suppose R = 7 and G = 9. Then THREE = ORIENT = ARE = 29, and we must also have KINGS = K+2+4+9+3 = 29 so K = 11. But we already have H = 11.

So R and G are 9 and 7; THREE = ORIENT = ARE = 31. K = 15 to make KINGS = 31, F = 21 to make OF = 31, and W = 26 to make WE = 31.

Then A, N, S, W, E, R = 17, 4, 3, 26, 5, 9.

Enigma 1727

Spoiler for New Scientist Enigma 1727: “Common Factors” (Follow the link to see the puzzle.)

If b is the middle number then the sum of the three is 3b and the product is b(b2–1). For 3b to have at least six factors, b must be composite.

Clearly all the factors of b are common factors of both the sum and the product. So are 3 times those factors, if (b2–1) is divisible by 3. But one of b–1, bb+1 is divisible by 3, and if it’s not b then (b2–1) is divisible by 3. So if b is not divisible by 3, and has n factors, then both 3b and b(b2–1) have at least 2n factors in common. Since b is composite it has three distinct factors if it is the square of a prime and more than three distinct factors otherwise. For the number of common factors to be 6, then, b must be the square of a prime if it is not divisible by 3.

But if b is the square of a prime (and is a two-figure number, therefore not 4) then it is odd, its factors are odd, and all six factors of 3b are odd. Their sum is even.

So b instead must be divisible by 3.

In that case all the factors of b are common factors of 3b and b(b2–1), but there are no others. So b must have exactly six distinct factors. For that to happen b must be of the form pq2, where p and q are both prime. The factors of b are 1, pqq2pq, and pq2.

If p and q are both odd then all six factors are odd and their sum is even. If p is odd and q is even then again the sum is even. If p is even and q is odd then the sum is odd. So q is 3 and p is even, and there aren’t many even primes.

b = pq= 18. 17+18+19 = 54 with factors 1, 2, 3, 6, 9, 18 summing to 39; 17 x 18 x 19 = 5814 having those six factors among others.


Enigma 1692

[Originally published at Doctroidal Dissertations.]

Spoiler for New Scientist Enigma 1692:

Clever logic should enable you to find the nine-figure number that I have in mind. It consists of the digits 1 to 9 in some order, and in the number each digit is next to another that differs from it by one.

In just one case a digit has both neighbours differing from it by one. Furthermore, the solution is exactly divisible by more than three-quarters of the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12.

What is the nine-figure number?

The number can’t be divisible by 10, because it doesn’t end in 0. However, it has to be even if 10 of the first 12 integers are to be factors. So it can’t be divisible by 5 either. Having ruled out 5 and 10, the remaining numbers 1, 2, 3, 4, 6, 7, 8, 9, 11, and 12 must be factors.

If 11 is a factor then the sum of the digits in the odd places (call this so) minus the sum of the digits in the even places (call this se) must be a multiple of 11. In fact, since so+se=45, so and se must have opposite parity so must differ by 11. Therefore so = 28 and se = 17.

1 and 2 can’t both be in even places (or odd); neither can 8 and 9. So, looking at sets of four digits that sum to 17 and contain exactly one of 1 and 2 and exactly one of 8 and 9, there are only three possible even place / odd place divisions: 1349/25678, 1358/24679, or 2348/15679. But the first of these can be ruled out because 7 has to be next to 6 or 8, and likewise the last because 3 must be next to 2 or 4.

So the split must be 1358/24679. 9 must be an odd-place digit; 8 must be next to 9; and since 7 cannot be next to 6 it must be next to 8. Therefore 8 is the one digit for which both neighbors differ from it by one.

For divisibility by 4, and noting that the last two digits must differ by 1, that 1 and 2 must be adjacent, and that 7 cannot be next to 6, the last two digits must be 12 or 56. Then for divisibility by 8 the last 3 digits must be 312, 512, 712, 912, 256, 456, or 856. Of these 312, 512, and 856 are not possible with the odd-even place split required. 456 is ruled out because 5 differs from both 4 and 6 by one. So our number ends with 712, 912, or 256.

If 712: We have to end with 98712. The two preceding digits, and the two before them, can be 43 or 65, but 6543 isn’t allowed, so the only candidate is 436598712.

If 912: Similarly there is only one candidate, 436578912.

If 256: The preceding digit is 1. Then the first five digits must be the group 789 or 987, and 43 or 34. The four candidates are 437891256, 439871256, 789341256, and 987341256.

Of these six candidates only 436578912 is divisible by 7. Divisibility by 1, 2, 3, 4, 6, 8, 9, 11, and 12 has been guaranteed by our procedure, so this is the solution.

Enigma 1691

[Originally published at Doctroidal Dissertations.]

Spoiler for New Scientist Enigma 1691:

The number 3120 is divisible without remainder by each number in the following set: 3, 312, 12, 120, 2 and 20. Each of these numbers will be called a visible proper divisor (VPD) of 3120 because each is visible either as a single digit or as a group of adjacent digits in 3120. (1 and 3120 have been excluded as being improper, in order that any prime number has no VPDs).

ENIGMA represents an odd six-digit number in which all the digits are different. The set of all VPDs of ENIGMA is E, NI, IG, G, GMA, M, MA, and A. What is ENIGMA?

If ENIGMA is odd, then so are all its factors. This means E, I, G, M, and A must be odd digits. None but I can be 1 (the rest must be proper factors). ENIGMA is divisible by 5, so A must be 5. The other three must be 3, 7, and 9.

ENIGMA is divisible by 9, so its digits must sum to a multiple of 9. The sum is 1+3+5+7+9+N = 25+N, so N must be 2.

There are then six possibilities of the form E21GM5. Of these only one, 921375, is divisible by 7. Of course it is also divisible by NI = 21 since it’s divisible by 3. It’s obviously divisible by 25 and divisibility by 3 means it’s divisible by MA = 75. We have to check separately for IG = 13 and GMA = 375. It passes.