20190505, 04:56  #12 
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,333 Posts 
Looks like it's gonna be a quiet weekend.
So I will post here. 176 correct submissions and no solutions posted yet. I assume the challenge is closed. No clue what the May challenge is talking about. Looks like they have decided to raise the bar this month. 
20190506, 11:55  #13 
Aug 2002
2^{3}·1,069 Posts 

20190508, 00:57  #14  
"Rashid Naimi"
Oct 2015
Remote to Here/There
2333_{10} Posts 
Quote:
You can run the following code in PariGP and then Copy & Paste the output (between the Markings) in PariGP to solve any (arbitrary speaking) positive odd number of Rows=Columns except for 19, 1 (and incidentally 0 ). For larger Matrices you would need to modify the code so that it outputs to a file rather than the screen. The algorithm is to populate all the Matrix with a prime number (19 in this case) and then increment all cells except for the central one by 6*(number of rows) until a prime is found that restores the prime average criteria. It doesn't take long to get a solution. Code:
\\CTI100A by Rashid Naimi \\ Run once in PariGP and the Copy the result between the markings and Paste in PariGP \\ https://pari.math.ubordeaux.fr/ allocatemem() theSize = 101 \\\\\Enter an odd number other than 19 (dimension for the number of Rows/Columns) theSize = theSize\2*2+1 { theString =Str(" \\\\\\\\\\\\\\\\\\\\\\\\\\\Start copying from here.\\\\\\\\\\\\\\\\\\\\\\\\\\\ theSize = ",theSize ," a=matrix(theSize ,theSize ) for(i=1,theSize ,{ for(j=1,theSize , a[i,j]=19; ); }) a largestPrime =19; for(i=1,theSize ,{ for(j=1,theSize , if(i==theSize\\2+1 && j==theSize\\2+1 ,next()); a[i,j]=largestPrime +theSize *6; while( !isprime(a[i,j])  !isprime((a[i,1]");\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ for(k=2,theSize ,theString =Str(theString,"+a[i,",k,"]")); theString =Str(theString,")/theSize )  !isprime((a[1,j]");\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ for(k=2,theSize ,theString =Str(theString,"+a[",k,",j]")); theString =Str(theString,")/theSize )  !isprime((a[1,1]");\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ for(k=2,theSize ,theString =Str(theString,"+a[",k,",",k,"]")); theString =Str(theString,")/theSize )  !isprime((a[1,",theSize ,"]");\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ for(k=2,theSize ,theString =Str(theString,"+a[",k,",",theSizek+1,"]")); theString =Str(theString,")/theSize ) ,a[i,j]=a[i,j]+theSize *6; ); largestPrime =a[i,j]; ); }) for(i=1,theSize ,print(a[i,])) \\\\\\\\\\\\\\\\\\\\\\\\\\\End copying here & Paste in PariGP\\\\\\\\\\\\\\\\\\\\\\\\\\\ "); } print(theString ); Code:
[ 127 397 829 991 1747 3259 3529 4339 5419] [ 5527 7417 7741 8929 11251 13411 14437 15787 16651] [ 16759 22051 25939 29017 29989 32257 34039 35227 39979] [ 42409 44029 47809 59149 60337 61687 62929 64171 65413] [ 65629 65899 70867 73459 19 74377 76213 78427 79399] [ 82531 83773 84691 108991 109639 114661 116443 121789 125353] [129457 130699 148573 149059 149113 153271 158293 158563 162829] [163909 172009 172171 174763 176383 177949 179947 189019 190261] [212239 214129 216829 217369 227251 229249 229897 231409 247609] 

20190508, 03:47  #15 
"Kebbaj Reda"
May 2018
Casablanca, Morocco
1100011_{2} Posts 
Hi Rachid Naimi,
The question is like this: Find a b c d e f g h i Such the squre : a b c d e f g h i (a+b+c)/3 is prime (d+e+f)/3 prime (g+h+i)/3 prime (a+d+g)/3 prime (b+e+h)/3 prime (c+f+i)/3 prime (a+e+i)/3 prime (c+e+g)/3 prime All a,b,c,d,e,f,g,h,i are primes numbers. It's easy 3x3. Your 9×9 is Fauls: Example: First line 127+397+829+991+1747+3259+3529+4339+5419= 17378 The average is 17378/9 is not integer. Not Prime. Reda Kebbaj. 
20190508, 04:19  #16 
"Kebbaj Reda"
May 2018
Casablanca, Morocco
3^{2}×11 Posts 
There is a lot of 4X4, 5X5 solution.
Here is one from Professor Barry O'Sulivan,MRIA: 4x4 19 37 31 29 97 17 11 23 43 7 13 109 5 103 61 3 Rows: 29.0 37.0 43.0 43.0 Cols: 41.0 41.0 29.0 41.0 Up: 13.0 Down: 2.0 5x5 29 61 41 31 23 127 17 43 19 89 59 67 3 37 199 83 13 79 11 229 7 107 139 47 5 Rows: 37.0 59.0 73.0 83.0 61.0 Cols: 61.0 53.0 61.0 29.0 109.0 Up: 13.0 Down: 2.0 Thanks to Serge Batalov who made me discover by a post on this forum the first time the sit IBM Ponther This. Reda Kebbaj. 
20190508, 04:48  #17 
Jun 2003
12474_{8} Posts 

20190508, 23:55  #18 
"Kebbaj Reda"
May 2018
Casablanca, Morocco
3^{2}×11 Posts 
Well seen axn!!

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
January 2019  Xyzzy  Puzzles  74  20190409 13:34 
March 2019  Xyzzy  Puzzles  6  20190404 16:32 
February 2019  Xyzzy  Puzzles  17  20190307 21:05 
2019 Coding Challenge  miroslavkures  Number Theory Discussion Group  2  20181227 08:59 