2017 UNCO Math Contest II Problems/Problem 3
Problem
Prime Mates
Find the largest 9 digit integer in which no two digits are the same and the sum of each pair of adjacent digits is prime. That is, the sum of the first two digits is prime, the sum of the second and third digits is prime, the sum of the third and fourth digits is prime, and so on.
Solution
Since we want to maximize the integer, let's first start with . Using a greedy algorithm, we can do this series of changes (commas omitted): Thus the answer is or
See also
2017 UNCO Math Contest II (Problems • Answer Key • Resources) | ||
Preceded by Problem 2 |
Followed by Problem 4 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 | ||
All UNCO Math Contest Problems and Solutions |