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!)
A114016 Least n-digit prime which differs from the next prime at every corresponding digit. 1

%I #9 Dec 05 2013 19:57:13

%S 2,19,199,1999,19997,199999,2999999,19999999,199999991,1999999973,

%T 19999999967,299999999989,1999999999981,19999999999997,

%U 399999999999997,1999999999999943,49999999999999993,199999999999999949,1999999999999999909,19999999999999999939

%N Least n-digit prime which differs from the next prime at every corresponding digit.

%C The corresponding next-primes are 3, 23, 211, 2003, 20011, 200003, 3000017, ... - _Michel Marcus_, Sep 15 2013

%e 1999 is a term as the next prime 2003 differs at every corresponding position (1,2), (9,0),(9,0),(9,3).

%o (PARI) ok(fp) = {fpa = precprime(fp); fpb = nextprime(fp); da = digits(fpa); db = digits(fpb); for (i=1, #da, if (da[i] == db[i], return (0));); return (fpa);}

%o a(n) = {if (n == 1, return (2)); for (i = 2, 9, if (p = ok(i*10^(n-1)), return(p));); return (0);} \\ _Michel Marcus_, Sep 15 2013

%Y Cf. A114017.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Nov 12 2005

%E 2 more terms from _R. J. Mathar_, Aug 31 2007

%E More terms from _Michel Marcus_, Sep 15 2013

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 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)