Joe’s pyramid is a puzzle in which very stone is marked with a different one or two digit positive number. Where a stone rests on two others, its number is the sum of the numbers marked on the two stones on which it rests. The challenge is to find the value of the top stone
The first step is to mark each stone on the lowest level with
As each stone can have a maximum of two digit,
Using the smallest possible values for
Since these must be a multiple of 5
As 1, 2, 3, 4 are taken, then for this equation to equal 34,
Plugging
Therefore,
Similarly, with
Therefore,
To find the solutions, I created an R script JoesPyramid.R that iterates over constrained values for {a,b,c,d,e,f}. The value of each is compared with the others and if a value appears twice the loop is skipped. After a unique set of values if found, then a checkpoint ensures that
There are two arrangements of the stones that satisfy all the constraints. In both cases, the pyramid is symmetrical and