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.

A072274 List of Ormiston prime pairs.

Original entry on oeis.org

1913, 1931, 18379, 18397, 19013, 19031, 25013, 25031, 34613, 34631, 35617, 35671, 35879, 35897, 36979, 36997, 37379, 37397, 37813, 37831, 40013, 40031, 40213, 40231, 40639, 40693, 45613, 45631, 48091, 48109, 49279, 49297, 51613, 51631, 55313, 55331, 56179, 56197
Offset: 1

Views

Author

Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002

Keywords

Comments

Given the n-th prime, it is occasionally possible to form the (n+1)th prime using the same digits in a different order. Such a pair is an Ormiston Pair.
Ormiston Pairs occur rarely but randomly. It is thought that there are infinitely many but this has not been proved. They always differ by a multiple of 18. Ormiston Triples may exist but must be very large.
The smallest Ormiston triple is (11117123, 11117213, 11117321), the smallest Ormiston quadruple is (6607882123, 6607882213, 6607882231, 6607882321); see Andersen link. - Klaus Brockhaus, Jul 22 2009
The current wording of the definition suggests that the second member of Ormiston prime triples (cf. A075093) is repeated. Indeed, such a triple (p,q,r) corresponds to two pairs (a(2k-1)=p,a(2k)=q) and (a(2k+1)=q,a(2k+2)=r). (If they were listed as ...,p,q,r,..., then the sequence would still contain both pairs as (non-disjoint) subsequences. But if that was the intended meaning, then one would prefer the title "Members of O. prime pairs" (or simply O. primes?). Under this assumption, a(n)=a(n+1) iff a(n-1)=A075093(k) (for some k) is the smallest member of an Ormiston prime triple (a(n-1), a(n)=a(n+1), a(n+2)). In particular this is the case for the first two elements of Ormiston quadruples, cf. A161160. - M. F. Hasler, Oct 11 2012
The term "Ormiston pair" was coined by Andy Edwards in 2002 after Ormiston College in Queensland, Australia. - Amiram Eldar, Nov 25 2020

Examples

			Although 179 and 197 are composed of the same digits, they do not form an Ormiston Pair as several other primes intervene (i.e. 181, 191, 193.)
		

Crossrefs

Cf. A069567.
Cf. A075093 (smallest member of Ormiston prime triple), A161160 (smallest member of Ormiston prime quadruple).

Programs

  • Magma
    &cat[ [ p, q ]: p in PrimesUpTo(52000) | (q-p) mod 18 eq 0 and a eq b where a is Sort(Intseq(p)) where b is Sort(Intseq(q)) where q is NextPrime(p) ]; // Klaus Brockhaus, Jul 22 2009
    
  • Mathematica
    a = {1}; b = {2}; Do[b = Sort[ IntegerDigits[ Prime[n]]]; If[a == b, Print[ Prime[n - 1], ", ", Prime[n]]]; a = b, {n, 1, 10^4}]
  • PARI
    is(n)=if(!isprime(n), return(0)); my(d=vecsort(digits(n))); vecsort(digits(precprime(n-1)))==d || vecsort(digits(nextprime(n+1)))==d \\ Charles R Greathouse IV, Mar 07 2016
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        p, hp, q, hq = 2, "2", 3, "3"
        while True:
            if hp == hq: yield from [p, q]
            p, q = q, nextprime(q)
            hp, hq = hq, "".join(sorted(str(q)))
    print(list(islice(agen(), 38))) # Michael S. Branicky, Feb 19 2024

Formula

a(2k-1)=A069567(k); a(2k)=nextprime(a(2k-1)+1). - M. F. Hasler, Oct 13 2012

Extensions

Edited and corrected by Robert G. Wilson v, Jul 15 2002