|
|
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.
|
|
0
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In base 4 all consecutive primes with no common digit are of this form, except for 2 and 3.
It is unknown whether this sequence is infinite.
Base 2 and base 3 have no such primes.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
Select[Range[100], ! IntersectingQ @@ IntegerDigits[NextPrime[4^#, {-1, 1}], 4] &] (* Amiram Eldar, Mar 03 2023 *)
|
|
PROG
|
(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()
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|