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!)
A068803 Smaller of two consecutive primes which have no common digits. 2
2, 3, 5, 7, 19, 29, 37, 47, 59, 79, 97, 397, 499, 599, 1999, 2999, 3989, 4999, 29989, 49999, 59999, 79999, 199999, 599999, 799999, 2999999, 4999999, 5999993, 19999999, 29999999, 59999999, 69999989, 99999989, 199999991, 699999953, 799999999, 5999999989, 6999999989 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Is the sequence finite or infinite?
Except for 2, 3, 5, and 7, all such primes are of the form a*10^n-b with 1 <= a <= 8 and b mod 10 = 1, 3, 7 or 9. An example of a large pair is 10^101-203 and 10^101+3. The largest known pair of probable primes is 8*10^5002-6243 and 8*10^5002+14481. - Lewis Baxter, Mar 06 2023
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..804
EXAMPLE
397 is a term as 397 and 401 are two consecutive primes with no common digits.
MATHEMATICA
First /@ Select[Partition[Prime[Range[10^6]], 2, 1], Intersection @@ IntegerDigits /@ # == {} &] (* Jayanta Basu, Aug 06 2013 *)
PROG
(PARI) isok(p) = isprime(p) && (#setintersect(Set(digits(p)), Set(digits(nextprime(p+1)))) == 0); \\ Michel Marcus, Mar 27 2023
(Python)
from itertools import count, islice
from sympy import nextprime, prevprime
def agen(): # generator of terms
yield from [2, 3, 5]
for d in count(2):
for b in range(10**(d-1), 10**d, 10**(d-1)):
p, q = prevprime(b), nextprime(b)
if set(str(p)) & set(str(q)) == set():
yield p
print(list(islice(agen(), 40))) # Michael S. Branicky, May 09 2023
CROSSREFS
Cf. A076490.
Sequence in context: A346167 A163074 A230041 * A184902 A048419 A087562
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 06 2002
EXTENSIONS
More terms from Larry Soule (lsoule(AT)gmail.com), Jun 21 2006
a(36) and beyond from Michael S. Branicky, May 09 2023
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 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)