A361173 Numbers k such that, in base 4, the greatest prime less than 4^k and the least prime greater than 4^k have no common digit.
1, 4, 28, 83, 1816
Offset: 1
Examples
k=4 is a term: the consecutive primes are 251 and 257. In base 4 their representations are 3323 and 10001, which have no common digit.
Links
- Mathematics StackExchange, Are there an infinity of disjoint consecutive primes?
Programs
-
Mathematica
Select[Range[100], ! IntersectingQ @@ IntegerDigits[NextPrime[4^#, {-1, 1}], 4] &] (* Amiram Eldar, Mar 03 2023 *)
-
PARI
isok(k) = #setintersect(Set(digits(precprime(4^k), 4)), Set(digits(nextprime(4^k), 4))) == 0; \\ Michel Marcus, Mar 03 2023
-
Python
from sympy.ntheory import digits, nextprime, prevprime def ok(n): p, q = prevprime(4**n), nextprime(4**n) return set(digits(p, 4)[1:]) & set(digits(q, 4)[1:]) == set() print([k for k in range(1, 99) if ok(k)]) # Michael S. Branicky, Mar 03 2023
Comments