Is it possible to write all integer from 1 to 10 in a row in some order such that any two adjacent number add up to a prime number ?
Inspired by Numberphile .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice question. I wonder what the largest integer N is such that we can write the integers 1 to N in this way?
Many solutions but the one with perhaps the least disruptions to the order is as follows.
1 , 2 , 3 , 4 , 7 , 6 , 5 , 8 , 9 , 1 0
1 , 2 , 3 , 4 , 7 , 1 0 , 9 , 8 , 5 , 6
Another one that hasn't yet been posted: 10 1 2 3 4 9 8 5 6 7
There are loads of solutions that can satisfy the conditions of this question, but there is a subtle detail to be identified, the numbers shall always be alternative, i.e., if you start with an odd number, you have to write an even number after it, and, then an odd number, then again even, then odd and so on... Thats because of a simple reason, if you add two even numbers, they will give you an even number, so if any two even numbers are next to each other, they will not give a prime number. If you keep two odd numbers together ,they again sum up to an even number. You can write down all the odd numbers first (or even numbers, your choice) and then try to fit in the rest of the numbers in between them so that you may get a prime sum with the neighbouring numbers. Here's what I got : 9, 2, 1, 4, 7, 6, 5, 8, 3, 10.
1 , 2 , 3 , 4 , 7 , 6 , 5 , 8 , 9 , 1 0 is one example
1 0 , 9 , 8 , 3 , 2 , 1 , 4 , 7 , 6 , 5
Problem Loading...
Note Loading...
Set Loading...
We can construct a graph with the numbers as vertices and connect two numbers with an edge if their sum is a prime number. Every hamiltonian path of the graph is then a solution to our problem. There are actually several.
1 0 , 9 , 4 , 7 , 6 , 5 , 8 , 3 , 2 , 1