Prime-Sum

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 .

Yes No

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.

9 solutions

Romain Bouchard
Jan 13, 2018

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.

10 , 9 , 4 , 7 , 6 , 5 , 8 , 3 , 2 , 1 10,9,4,7,6,5,8,3,2,1

Nice question. I wonder what the largest integer N N is such that we can write the integers 1 1 to N N in this way?

Brian Charlesworth - 3 years, 4 months ago
Chew-Seong Cheong
Jan 13, 2018

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 , 10 1, 2, 3, 4, 7, 6,5,8,9,10

Munem Shahriar
Jan 13, 2018

1 , 2 , 3 , 4 , 7 , 10 , 9 , 8 , 5 , 6 \large 1,2,3,4,7,10,9,8,5,6

Leonel Castillo
Jan 13, 2018

Another one that hasn't yet been posted: 10 1 2 3 4 9 8 5 6 7

Chirag Adwani
Feb 4, 2018

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 , 10 1, 2, 3, 4, 7, 6, 5, 8, 9, 10 is one example

Elîte Keryakos
May 6, 2018

9 10 1 2 3 4 7 6 5 8

Aditi Paretkar
Feb 1, 2018

10 , 9 , 8 , 3 , 2 , 1 , 4 , 7 , 6 , 5 10, 9 ,8 ,3, 2 ,1 ,4 ,7, 6 ,5

1,2,3,4,7,10,9,8,5,6

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...