1.6 KiB
1.6 KiB
id | challengeType | title |
---|---|---|
5900f3ec1000cf542c50feff | 5 | Problem 128: Hexagonal tile differences |
Description
By finding the difference between tile n and each of its six neighbours we shall define PD(n) to be the number of those differences which are prime. For example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and 13. So PD(8) = 3. In the same way, the differences around tile 17 are 1, 17, 16, 1, 11, and 10, hence PD(17) = 2. It can be shown that the maximum value of PD(n) is 3. If all of the tiles for which PD(n) = 3 are listed in ascending order to form a sequence, the 10th tile would be 271. Find the 2000th tile in this sequence.
Instructions
Tests
tests:
- text: <code>euler128()</code> should return 14516824220.
testString: assert.strictEqual(euler128(), 14516824220, '<code>euler128()</code> should return 14516824220.');
Challenge Seed
function euler128() {
// Good luck!
return true;
}
euler128();
Solution
// solution required