A224164 Prime numbers with m^2 digits that, if arranged in an m X m matrix, form m-digit reversible primes in each row and column and along the main diagonal.
2, 3, 5, 7, 1117, 1171, 7331, 131983991, 179907191, 179991179, 191199311, 191739971, 191797919, 199199311, 199709971, 199937971, 337353739, 373151113, 733353337, 797389337, 919311739, 971727179, 1193100992213191, 1193120192093911, 1193123793413719
Offset: 1
Examples
a(5) = 1117 is the smallest 4-digit prime that if arranged in a 2 X 2 matrix yields in each row and column and along the main diagonal a number that is prime in both directions, i.e., 11 17 -> 11 (4 times), 17 (3 times), 71 (3 times) are all reversible primes. a(8) = 131983991 is the smallest 9-digit prime that if arranged in a 3 X 3 matrix yields in each row and column and along the main diagonal a number that is prime in both directions, i.e., 131 983 991 -> 131 (4 times), 181, 199, 389, 983, 991 (each 2 times) are all reversible primes. a(23) = 1193100992213191 is the smallest 16-digit prime that if arranged in a 4 X 4 matrix yields in each row, and column and along the main diagonal a prime in both directions, i.e., 1193 1009 9221 3191 -> 1009, 1021 (2 times), 1193 (3 times), 1201 (2 times), 1229, 1913, 3191, 3911 (3 times), 9001, 9029, 9209, 9221 are all reversible primes.
References
- Chris K. Caldwell, G. L. Honaker, Jr.: Prime Curios! The Dictionary of Prime Number Trivia. CreateSpace 2009, p. 219, and 229.
Links
- Martin Renner and Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 108 terms from Martin Renner)
- Chris K. Caldwell and G. L. Honaker, Jr., Prime Curios! 733353337.
- Chris K. Caldwell and G. L. Honaker, Jr., Prime Curios! 3391382115599173.
- Chris K. Caldwell and G. L. Honaker, Jr., Prime Curios! 19973...37991 (25-digits).
Crossrefs
Cf. A224398.
Programs
-
Maple
# Maple program generating all 4-digit primes M:={}: for a in [1,3,7,9] do for b in [1,3,7,9] do if isprime(10*a+b) and isprime(10*b+a) then for c in [1,3,7,9] do for d in [1,3,7,9] do if isprime(10*c+d) and isprime(10*d+c) and isprime(10*a+c) and isprime(10*c+a) and isprime(10*b+d) and isprime(10*d+b) and isprime(10*a+d) and isprime(10*d+a) then S:=[a,b,c,d]: if isprime(add(S[j]*10^(4-j),j=1..4)) then M:={op(M),add(S[j]*10^(4-j),j=1..4)}: fi: fi: od: od: fi: od: od: M; # Maple program generating all 9-digit primes M:={}: for d in [1,3,7,9] do for e from 0 to 9 do for f in [1,3,7,9] do if isprime(100*d+10*e+f) and isprime(100*f+10*e+d) then for a in [1,3,7,9] do for b in [1,3,7,9] do for c in [1,3,7,9] do if isprime(100*a+10*b+c) and isprime(100*c+10*b+a) then for g in [1,3,7,9] do for h in [1,3,7,9] do for i in [1,3,7,9] do if isprime(100*g+10*h+i) and isprime(100*i+10*h+g) and isprime(100*a+10*d+g) and isprime(100*g+10*d+a) and isprime(100*b+10*e+h) and isprime(100*h+10*e+b) and isprime(100*c+10*f+i) and isprime(100*i+10*f+c) and isprime(100*a+10*e+i) and isprime(100*i+10*e+a) then S:=[a,b,c,d,e,f,g,h,i]: if isprime(add(S[j]*10^(9-j),j=1..9)) then M:={op(M),add(S[j]*10^(9-j),j=1..9)}: fi: fi: od: od: od: fi: od: od: od: fi: od: od: od: M;
Comments