Prime Me!

I have a number that I like. It is 6 digits long and consist of the digits 1, 2, 3, 4, 5, and 6.

The reason why I like the number is because the sum of any 2 adjacent numbers is a prime number, and the sum of the first and last number is also a prime number!

If the 1st digit of the number is 1, what is the 4th digit of the number?

For example, 123456 is not the number, as the sum of 4 and 5 is 9, which is not prime.

2 4 6 5 3 Impossible to deduce

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.

2 solutions

We may find pairs of { 1 , 2 , 3 , 4 , 5 , 6 } \{1,2,3,4,5,6\} such that their sum is a prime number.

( 1 , 2 ) , ( 1 , 4 ) , ( 1 , 6 ) , ( 2 , 3 ) , ( 2 , 5 ) , ( 3 , 4 ) , ( 5 , 6 ) (1,2),(1,4),(1,6),(2,3),(2,5),(3,4),(5,6)

Order does not matter. Then make a graphs with 6 6 nodes, named by the numbers { 1 , 2 , 3 , 4 , 5 , 6 } \{1,2,3,4,5,6\} . there would be an edge between two nodes iff their corresponding numbers make a pair that exist in the set above. Making a desired number is equivalent to making a Hamiltonian cycle on the graph. Since the first digit (from the left) is 1 1 , we should start from node 1 1 and return to node 1 1 . node 1 1 has three neighbours. If we go to node 2 2 , in the first step, then we are gonna have to take one of the two cycles of length 4 to return to 1 1 . But, a Hamiltonian cycle is of length 6 6 . If we go to either 4 4 or 6 6 from 1 1 , then we can successfully complete a Hamiltonian loop and in both cases, the fourth digit is 2 2 .

X X
Nov 9, 2018

3 can only go with 2 or 4, and 6 can only go with 1 or 5, and 5 can only go with 2 or 6.

So, let the number after 1 be 6, thn the number will be 165234. (or it can be 143256)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...