4
$\begingroup$

Can you place distinct numbers from 0 to 9 on a 3x3 grid such that every pair of neighbouring (horizontally and vertically) numbers sum to a prime? Can you find multiple solutions? Note that the placed numbers can only be used once and one number will remain unused. The generated primes can be reused.

Good luck!

$\endgroup$

3 Answers 3

7
$\begingroup$

The answer is:

Yes

Explanation:

650
123
498
Where the generated primes in the rows are 11, 5, 3, 5, 13, 17 respectively, and in the columns 7, 5, 7, 11, 3 and 11.

Further:

You can generate multiple solutions from reflecting and rotating this grid. I don't know if you can make any more solutions which are fundamentally different from this, though I haven't tried.

$\endgroup$
0
3
$\begingroup$

No, it's not possible.
Due to in 3x3 grid, there are total 12 neighboring pairs. And consider to combination in 0~9, we can have minimal pair result $0+1=1$ and maximum pair result $8+9=17$. However in the first 12 primes are: $2,3,5,7,11,13,17,23,29,31,37,41$. Hence it's not possible.

Update:
After questions has been added "The generated primes can be reused." criteria, I've found one:

0 5 6
3 2 1
8 9 4
And you could get another solution by flip or rotate this to get a new one.

$\endgroup$
7
  • 1
    $\begingroup$ You can reuse the generated primes. $\endgroup$ Sep 24, 2019 at 5:37
  • $\begingroup$ Well, you just edited after the answer... $\endgroup$
    – Conifers
    Sep 24, 2019 at 5:41
  • $\begingroup$ Sorry about that. I just clarified the question. I didn't downvote you. $\endgroup$ Sep 24, 2019 at 5:45
  • 1
    $\begingroup$ Well I thought it was well formed... numbers cannot be reused while I didn't say anything about reusing primes. I added the extra bit just to make sure it's clear. $\endgroup$ Sep 24, 2019 at 5:57
  • 1
    $\begingroup$ OK nevermind. I just think too much. $\endgroup$
    – Conifers
    Sep 24, 2019 at 5:59
3
$\begingroup$

By brute force computer search, I've found

there are 4 distinct solutions (ignoring rotations and reflections)

They are

038
529
614
038
749
612
129
438
705
129
658
703

$\endgroup$
1
  • 2
    $\begingroup$ I wrote out a big long answer with a mathematical way of calculating all the permutations (84), and then saw your answer and realized that 1 is not prime... :( $\endgroup$ Sep 24, 2019 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.