login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A114016
Least n-digit prime which differs from the next prime at every corresponding digit.
1
2, 19, 199, 1999, 19997, 199999, 2999999, 19999999, 199999991, 1999999973, 19999999967, 299999999989, 1999999999981, 19999999999997, 399999999999997, 1999999999999943, 49999999999999993, 199999999999999949, 1999999999999999909, 19999999999999999939
OFFSET
1,1
COMMENTS
The corresponding next-primes are 3, 23, 211, 2003, 20011, 200003, 3000017, ... - Michel Marcus, Sep 15 2013
EXAMPLE
1999 is a term as the next prime 2003 differs at every corresponding position (1,2), (9,0),(9,0),(9,3).
PROG
(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); }
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
CROSSREFS
Cf. A114017.
Sequence in context: A128970 A218117 A145104 * A268707 A037071 A126039
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 12 2005
EXTENSIONS
2 more terms from R. J. Mathar, Aug 31 2007
More terms from Michel Marcus, Sep 15 2013
STATUS
approved