prime consecutive sums - MATLAB Cody - MATLAB Central

Problem 54295. prime consecutive sums

Difficulty:Rate
Create a number sequence of 1 to n, such that the sums of every two consecutive numbers are all primes.
E.g. if n = 5, you may write the sequence as 1,4,3,2,5 or 3,4,1,2,5
if n = 6, you may wrtie the sequence as 2,3,4,1,6,5
The answer is not unique, so one correct answer enough.

Solution Stats

53.33% Correct | 46.67% Incorrect
Last Solution submitted on Dec 08, 2024

Problem Comments

Solution Comments

Show comments
Who Deserves Your Praise? Discover the New Contribution Widget!
...
We are excited to announce another update to our Discussions area: the...

Problem Recent Solvers8

Suggested Problems

More from this Author12

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page