A224398
Prime numbers with m^2 digits that, if arranged in an m X m matrix, form m-digit reversible primes in each row, column, and in the two main diagonals.
Original entry on oeis.org
2, 3, 5, 7, 1117, 1171, 179991179, 191797919, 337353739, 733353337, 1193100992213191, 1193120192093911, 1193900112293191, 1193902910213911, 1733922710213719, 1933913317893391, 1933983337193191, 3191100999231193, 3191949710331913, 3371722912019173
Offset: 1
When the digits of the prime p = 3391382115599173 are arranged in a 4 X 4 matrix:
3391
3821
1559
9173
the rows, the columns and the two main diagonals are 4-digit reversible primes, so p is in the sequence.
A375171
Square array T(n,k), n>0 and k>0, read by antidiagonals in ascending order, giving the smallest n*k-digit number that, if arranged in an n X k matrix, form k-digit reversible prime in each row and n-digit reversible prime in each column, or -1 if no such number exists.
Original entry on oeis.org
2, 37, 37, 337, 1111, 337, 3257, 111331, 113131, 3257, 32233, 13139731, 113101311, 11933371, 32233, 322573, 1111179779, 113101929311, 119310213191, 1119711779, 322573, 3222223, 111111131397, 113101167919739, 1193100990013911, 111971042937997, 111119111337, 3222223
Offset: 1
T(3,2) = 111331 is the smallest 3*2-digit number that if arranged in a 3 X 2 matrix yields in each row and column an reversible prime, i.e.,
11
13
31
-> 11 (1 time), 13 (1 time), 31 (1 time), 113 (1 time), 131 (1 time) are all reversible primes.
Table begins (upper left corner = T(1,1)):
2 37 337 3257 ...
37 1111 113131 11933371 ...
337 111331 113101311 119310213191 ...
3257 13139731 113101929311 1193100990013911 ...
... ... ... ... ...
-
isp(x) = ispseudoprime(x) && ispseudoprime(fromdigits(Vecrev(digits((x)))));
ispd(x) = ispseudoprime(fromdigits(x)) && ispseudoprime(fromdigits(Vecrev(x)));
vp(n) = select(isp, [10^(n-1)..10^n-1]);
isok(val, n, k) = my(d=digits(val), v=vector(k, i, []), j=1); for (i=1, #d, v[j] = concat(v[j], d[i]); j++; if (j>k, j=1);); for (i=1, k, if (!ispd(v[i]), return(0));); return(1);
T(n,k) = my(v = vp(k), nbp = #v, nb = nbp^n); for (i=0, nb-1, my(d=digits(i, nbp)); if (d==[], d=vector(n)); while(#d x+1, d); my(s=""); for (i=1, #d, s = concat(s, Str(v[d[i]]))); my(val = eval(s)); if (isok(val, n, k), return(val));); \\ Michel Marcus, Aug 08 2024
A375234
Square array T(n,k), n>1 and k>1, read by antidiagonals in ascending order, giving the smallest n*k-digit number that, if arranged in an n X k matrix, forms a k-digit emirp (A006567) in each row and an n-digit emirp in each column, or -1 if no such number exists.
Original entry on oeis.org
1331, 131337, 113337, 13139731, 113113337, 11933371, 1313717979, 113149971311, 119314713911, 1119737379, 131313131397, 113107709179991, 1193100990013911, 111971414339313, 111119333337
Offset: 2
T(3,2) = 131337 is the smallest 3*2-digit that if arranged in a 3 X 2 matrix yields in each row and column an emirp, i.e.,
13
13
37
-> 13 (2 times), 37 (1 times), 113 (1 time), 337 (1 time) are all emirps.
Table begins (upper left corner = T(2,2)):
1331 113337 11933371 ...
131337 113113337 119314713911 ...
13139731 113149971311 1193100990013911 ...
... ... ... ...
Showing 1-3 of 3 results.
Comments