7

Inspired by this question.

A wealthy, famous eccentric had a huge cube of equal sized diamonds.* Due to her eccentricities the number of diamonds was known to be both palindromic in base ten, and a multiple of $7$ - her lucky number.

* That is a cube of $n^3 | n \in \Bbb{N}$ diamonds.

One day $7$ thieves stole the cube and got away in a spaceship. They planned to break the cube up to share the diamonds out equally, since it would be too difficult to sell such a unique piece anywhere in the system.

During the flight $2$ of the thieves decided to do away with the other $5$ thieves and share the diamonds equally, however they found that $1$ diamond would be left over.

As they discovered this a third thief discovered them, and suggested they do away with the other $4$ thieves instead and again share the diamonds equally. Again there would be $1$ diamond left over, and again as they discovered this a fourth thief discovered them.

The process repeated until the seventh thief found the others plotting against him, and still with a single remaining diamond after splitting them into $6$ equal shares.

What was the minimum number of diamonds in the cube?

Jonathan Allan
  • 21,150
  • 2
  • 58
  • 109
  • The Seventh thief found them and found there'd be 1 left after spitting it in SIX? equal shares? What about thief #7 doesn't he get diamonds? – dcfyj Jun 10 '16 at 12:07
  • @dcfyj When the $6$ were sharing equally there would be $1$ remaining diamond. They already know the number of diamonds is divisible by $7$ due to the well publicised peculiarities of the famous eccentric. – Jonathan Allan Jun 10 '16 at 12:12

3 Answers3

7

I believe there were

1033394994933301 diamonds, in a cube 101101 on a side.

Solution by semi-brainless computer search. Here's the code (though the code I actually used -- and briefly had here -- had a stupid bug which by mere good luck happened not to make it find the wrong answer).

for n in range(1,100000000):
  m = 420*n+301
  m = m**3 # number is a cube
  s = str(m)
  if s != s[::-1]: continue
  print(n,m)
  break

The only non-obvious things here are:

  • m = 420*n+301: for k=2,3,4,5,6 it happens that $n^3=1$ mod k iff $n=1$ mod k, so the side length of our cube must be 1 mod 60. It also happens to be a multiple of 7, which means it needs to be 301 mod 420 as per the earlier puzzle linked from the question here.
  • s[::-1]: terse but unobvious Pythonese for reversing a sequence.
Gareth McCaughan
  • 119,120
  • 7
  • 313
  • 454
2

You don't actually say that when the 5th thief discovered the other 4 and demanded that the diamonds be divided into 5, that there would be 1 left over. So I suggest that there are 343 diamonds.

Rosie F
  • 8,621
  • 2
  • 18
  • 50
1

I believe the answer is:

10801 diamonds

because

if divided by 7 you get 1543 and if divided by any of the other numbers you get a remainder of 1. And also because it's the lowest palindromic number that fits the bill

I found the answer by using this:

vb.net code
For i As Integer = 0 To 50000
If i Mod 7 = 0 AndAlso i Mod 6 = 1 AndAlso i Mod 5 = 1 AndAlso i Mod 4 = 1 AndAlso i Mod 3 = 1 AndAlso i Mod 2 = 1 Then
txtPass.Text &= i.ToString() & "| "
End If
Next

dcfyj
  • 7,756
  • 23
  • 64