Prime Cycle

Form a cycle with a permutation of the first nn positive integers. The cycle is called Prime Cycle if all neighboring pairs sum up to be a prime. The two distinct prime cycles for n=6n=6 are:

  • 1,4,3,2,5,61,4,3,2,5,6
  • 1,6,5,2,3,41,6,5,2,3,4

The permutation 3,2,5,6,1,43,2,5,6,1,4 is considered the same as the first sequence.

How many distinct prime cycles are there for n=16n=16?


Problem Loading...

Note Loading...

Set Loading...