cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A068803 Smaller of two consecutive primes which have no common digits.

This page as a plain text file.
%I A068803 #29 Jul 02 2023 17:59:36
%S A068803 2,3,5,7,19,29,37,47,59,79,97,397,499,599,1999,2999,3989,4999,29989,
%T A068803 49999,59999,79999,199999,599999,799999,2999999,4999999,5999993,
%U A068803 19999999,29999999,59999999,69999989,99999989,199999991,699999953,799999999,5999999989,6999999989
%N A068803 Smaller of two consecutive primes which have no common digits.
%C A068803 Is the sequence finite or infinite?
%C A068803 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
%H A068803 Michael S. Branicky, <a href="/A068803/b068803.txt">Table of n, a(n) for n = 1..804</a>
%e A068803 397 is a term as 397 and 401 are two consecutive primes with no common digits.
%t A068803 First /@ Select[Partition[Prime[Range[10^6]], 2, 1], Intersection @@ IntegerDigits /@ # == {} &] (* _Jayanta Basu_, Aug 06 2013 *)
%o A068803 (PARI) isok(p) = isprime(p) && (#setintersect(Set(digits(p)), Set(digits(nextprime(p+1)))) == 0); \\ _Michel Marcus_, Mar 27 2023
%o A068803 (Python)
%o A068803 from itertools import count, islice
%o A068803 from sympy import nextprime, prevprime
%o A068803 def agen(): # generator of terms
%o A068803     yield from [2, 3, 5]
%o A068803     for d in count(2):
%o A068803         for b in range(10**(d-1), 10**d, 10**(d-1)):
%o A068803             p, q = prevprime(b), nextprime(b)
%o A068803             if set(str(p)) & set(str(q)) == set():
%o A068803                 yield p
%o A068803 print(list(islice(agen(), 40))) # _Michael S. Branicky_, May 09 2023
%Y A068803 Cf. A076490.
%K A068803 base,nonn
%O A068803 1,1
%A A068803 _Amarnath Murthy_, Mar 06 2002
%E A068803 More terms from Larry Soule (lsoule(AT)gmail.com), Jun 21 2006
%E A068803 a(36) and beyond from _Michael S. Branicky_, May 09 2023