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.

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.

This page as a plain text file.
%I A361173 #43 May 19 2023 04:18:49
%S A361173 1,4,28,83,1816
%N 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.
%C A361173 In base 4 all consecutive primes with no common digit are of this form, except for 2 and 3.
%C A361173 It is unknown whether this sequence is infinite.
%C A361173 Base 2 and base 3 have no such primes.
%H A361173 Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/4649148/are-there-an-infinity-of-disjoint-consecutive-primes">Are there an infinity of disjoint consecutive primes?</a>
%e A361173 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.
%t A361173 Select[Range[100], ! IntersectingQ @@ IntegerDigits[NextPrime[4^#, {-1, 1}], 4] &] (* _Amiram Eldar_, Mar 03 2023 *)
%o A361173 (PARI) isok(k) = #setintersect(Set(digits(precprime(4^k), 4)), Set(digits(nextprime(4^k), 4))) == 0; \\ _Michel Marcus_, Mar 03 2023
%o A361173 (Python)
%o A361173 from sympy.ntheory import digits, nextprime, prevprime
%o A361173 def ok(n):
%o A361173     p, q = prevprime(4**n), nextprime(4**n)
%o A361173     return set(digits(p, 4)[1:]) & set(digits(q, 4)[1:]) == set()
%o A361173 print([k for k in range(1, 99) if ok(k)]) # _Michael S. Branicky_, Mar 03 2023
%Y A361173 Cf. A104082, A104089, A068802, A156981.
%K A361173 nonn,base,more
%O A361173 1,2
%A A361173 _Lewis Baxter_, Mar 02 2023