The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A111349 Numbers n such that the result of swapping the 4th digit and the digit 3 positions from the last digit is prime. 2

%I #10 Mar 14 2015 10:02:02

%S 1003,1004,1007,1009,1010,1012,1013,1015,1016,1018,1019,1021,1024,

%T 1025,1030,1031,1040,1043,1049,1051,1054,1055,1060,1061,1063,1070,

%U 1082,1085,1088,1091,1094,1096,1099,1100,1105,1106,1108,1112,1114,1118,1123,1126

%N Numbers n such that the result of swapping the 4th digit and the digit 3 positions from the last digit is prime.

%C Leading zeros are dropped.

%C Since these numbers are just digit permutations of the primes the sequence is obviously infinite. - _Charles R Greathouse IV_, Oct 20 2008

%o (PARI) swapn(n,d) = \ d is the digit position to swap { local(j,ln,x,s,y,y2,tmp); for(x=10^(d-1),10^(d-1)+n, s = Str(x); ln = length(s); y = eval(Vec(s)); tmp=y[d]; y[d]=y[ln-d+1]; y[ln-d+1]=tmp; y2=0; for(j=1,ln, y2+=y[j]*10^(ln-j); ); if(isprime(y2),print1(x",")) ) }

%Y Cf. A095179, A111347, A111348.

%K easy,nonn,base

%O 1,1

%A _Cino Hilliard_, Nov 05 2005

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 May 14 20:39 EDT 2024. Contains 372533 sequences. (Running on oeis4.)