Very prime circles


This comes from the New York Times Numberplay blog:

Place the numbers 1 to 14 around a circle so that both the sum and the [positive difference] of any two neighboring numbers is a prime.

The proposer Bernardo Recamán uses the notation 2m=14 to denote a prime circle with the numbers 1, 2, 3, ... 14 and conjectures that this is the only value with a unique solution. Well then, how many prime circles are possible for the other values?

Some results

First, we need an even number of elements around the circle (why?), hence the use of 2m to denote the number of elements in the circle. The smallest possible neighbors of 3 are 8 and 10, which means there are no solutions for 2m=4,6,8. The number 6 has only one neighbor less than 10, so there is no solution for 2m=10. The smallest possible neighbors of 19 are 12 and 22, so there is no solution for 2m=20. Something interesting happens for 2m=22; 14 and 20 have the same set of possible neighbors: 3, 9, and 17, so whenever a circle is found, it has a twin with these elements reversed. But, since there are only three of them, one of these must be shared by both 14 and 20. Here's a partial table of results.
2mnumber of circles
. . .? OEIS entry


Here's one particularly nice string through increasing values of m; it requires the minimal amount of cuts to insert the next set of numbers.

This table shows possible neighbors as well as how often they appear in prime circles; the maximum is 50% since each numbers needs two neighbors.

Related problems


It is conjectured there aren't many values of m with no possible circles, so this gives us opportunity to be creative with all the possibilities. Can you arrange the numbers from 1 to 2m in a figure eight such that the sum and absolute difference of neighbors is prime? This is even possible for an odd number, 2m=15, as shown below.

A large circle

The probability of randomly choosing neighbors and ending up with a prime circle is 0% for large values of m. Nevertheless, here's one for 2m=100:

See another problem
or go home.

Tim Cieplowski, June 27, 2013, updated 1/10/15.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.