login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 4-digit prime abcd is a member if cdab is also a prime. c can be zero.
A 5-digit prime abcde is a member if both cdabe and adebc are primes. Again c can be zero, but not (of course) a.
LINKS
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: A178348 A359149 A250796 * A272754 A060519 A197422
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Apr 07 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)