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$
6
$\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$
2
$\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$
  • 1
    $\begingroup$ You can reuse the generated primes. $\endgroup$ – Dmitry Kamenetsky Sep 24 at 5:37
  • $\begingroup$ Well, you just edited after the answer... $\endgroup$ – Conifers Sep 24 at 5:41
  • $\begingroup$ Sorry about that. I just clarified the question. I didn't downvote you. $\endgroup$ – Dmitry Kamenetsky Sep 24 at 5:45
  • $\begingroup$ Please form a well-defined question before the post next time. It's not good when someone has answered but the issuer still modify the definition and let the original answer got wrong... $\endgroup$ – Conifers Sep 24 at 5:52
  • 1
    $\begingroup$ OK nevermind. I just think too much. $\endgroup$ – Conifers Sep 24 at 5:59
2
$\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
    $\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$ – GentlePurpleRain Sep 24 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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