

A271431


Primes with at least four digits that remain prime when any two adjacent groups of two digits switch places.


0



1103, 1109, 1123, 1163, 1181, 1193, 1301, 1303, 1319, 1321, 1327, 1361, 1777, 1783, 1907, 1913, 1931, 1933, 1949, 1951, 1979, 1987, 1993, 1997, 2113, 2131, 2161, 2311, 2333, 2339, 2347, 2377, 2381, 2389, 2393, 2399, 2707, 2713, 2729, 2741, 2777, 2791, 2909
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

A 4digit prime abcd is a member if cdab is also a prime. c can be zero.
A 5digit prime abcde is a member if both cdabe and adebc are primes. Again c can be zero, but not (of course) a.


LINKS

Table of n, a(n) for n=1..43.


PROG

(PARI) eva(n) = subst(Pol(n), x, 10)
switchdigits(n, k) = my(d=digits(n), v=vector(2)); v[1]=d[k]; v[2]=d[k+1]; d[k]=d[k+2]; d[k+1]=d[k+3]; d[k+2]=v[1]; d[k+3]=v[2]; eva(d)
is(n) = my(i=0); for(k=1, #Str(n)3, if(ispseudoprime(switchdigits(n, k)), i++)); if(i==#Str(n)3, return(1), return(0))
forprime(p=1000, 2000, if(is(p), print1(p, ", ")))


CROSSREFS

Sequence in context: A178407 A178348 A250796 * A272754 A060519 A197422
Adjacent sequences: A271428 A271429 A271430 * A271432 A271433 A271434


KEYWORD

nonn,base


AUTHOR

Felix FrÃ¶hlich, Apr 07 2016


STATUS

approved



