A072274 List of Ormiston prime pairs.
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
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.)
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..7444 from Klaus Brockhaus)
- Jens Kruse Andersen, Ormiston Tuples.
- Andy Edwards, Ormiston Pairs, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13.
- Eric Weisstein's World of Mathematics, Rearrangement Prime Pair.
Crossrefs
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
Comments