OFFSET
1,1
COMMENTS
Table is symmetric with respect to its main diagonal.
Like magic squares one can define primagic squares as a symmetric square table of numbers in which every partial concatenation of a row or column gives only primes. 2, 2 3 2 3 3 3 1, 3 1 1 3 1 1, ... are primagic squares of order 1 2 and 3 respectively occurring in the above array. An absolute primagic square can be defined as the one whose members are all prime. A strictly primagic square can be defined as the one in which both the diagonals also yield primes. The primagic square of order 3 above is an example.
EXAMPLE
The table starts with
2 3 3 3 3 ...
3 1 1 47 ...
3 1 1 21 ...
3 47 21 ...
3 ...
...
The first row/column gives primes 2, 23, 233, 2333, 23333, ..., while the fourth row/column gives primes 3, 347, 34721, 3472153, ...
PROG
(PARI) n=20; M=matrix(n, n); for(s=2, n+1, for(j=1, s-1, i=s-j; M[i, j]=1; while( !ispseudoprime( eval(concat(vector(i, k, Str(M[k, j])))) ) || !ispseudoprime( eval(concat(vector(j, k, Str(M[i, k])))) ), M[i, j]++); print1(M[i, j], ", "); )) /* Max Alekseyev */
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Apr 11 2003
EXTENSIONS
Edited and extended by Max Alekseyev, Mar 15 2014
STATUS
approved