Skip to main content

All Questions

2 votes
2 answers
1k views

Ring of numbers where adjacent entries sum up to a prime

Given a number n, find a permutation of the numbers 1...n such that all adjacent entries sum up to primes. If such a permutation does not exist, throw an error. Is there a purely-functional way to do ...
ithisa's user avatar
  • 237