Problems & Puzzles: Puzzles

 Puzzle 771. First P primes in a square. This is a very light prime-modification of the entry 1362 of the always interesting site of Claudio Meller.   BTW, this is a cousin-puzzle from the very initial puzzle in my site: Puzzle 001, very popular in its own time... Here you are asked to fill each cell of a NxN matrix with a one-digit integer such that you can obtain the first primes from 2 to P. A prime is well formed inside of this matrix if its k digits are located in k contiguous cells (contiguity by side or by corners are valid), reading in any straight direction. Carlos Rivera has obtained the following solutions for the first small N values from 2 to 4: For N=2, P=7   2 3 5 7   For N=3, P=59   3 4 7 5 1 3 9 2 1 For N=4, P=139   1 9 2 7 0 3 1 9 7 1 3 5 6 4 8 9     Q1. Can you find P-larger solutions for N=3 & N=4 Q2. Send your largest P for N=5 & 6.

Contributions came from Dmitry Kamenetsky and Emmanuel Vantieghem.

Important note. I made several mistakes in my solution for N=4. I did not follow the rule of forming the primes in a straight direction. i.e. the prime 101, and others. Perhaps this mistake of mine made impact in the solutions sent by Dmitry and Emmanuel. Hopefully they will send again solutions without this mistake.

***

Dmitry wrote:

In my solutions I assumed that one can revisit the same digit. Here are my best results.

N=3, Score=61
617
134
295

N=4, Score=211
6329
7147
9015
9839

N=5, Score=547
41423
50628
93791
47319
84524

N=6, Score=1283
123490
715640
894712
987321
350938
511662

Note by CR: revisiting digits is not allowed

Later, he sent the correct asked solutions

N=3 stays the same with score=61

N=4, Score 131
6101
4701
3923
1851

N=5, Score 223
19311
26101
12791
78359
94131

N=6, Score 283
182283
932216
347052
131127
850967
19719

***

Emmanuel wrote:

About puzzle 771, the best result for  N = 3  is
2 7 4
9 3 1
5 1 6
with  P = 61.

My the best result for  N = 4  is :
1 9 2 1
0 3 4 7
7 1 5 9
6 1 3 8
with  P = 157.  But I'm not sure this is maximal.

For  N = 5  I made a guess :
1 0 7 6 1
9 3 1 1 3
2 4 5 3 1
1 7 9 8 2
1 9 1 2 7
with  P = 241.  But I'm almost sure this is not maximal.

***

 Records   |  Conjectures  |  Problems  |  Puzzles