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.
%I A072274 #37 Feb 16 2025 08:32:46 %S A072274 1913,1931,18379,18397,19013,19031,25013,25031,34613,34631,35617, %T A072274 35671,35879,35897,36979,36997,37379,37397,37813,37831,40013,40031, %U A072274 40213,40231,40639,40693,45613,45631,48091,48109,49279,49297,51613,51631,55313,55331,56179,56197 %N A072274 List of Ormiston prime pairs. %C A072274 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. %C A072274 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. %C A072274 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 %C A072274 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 %C A072274 The term "Ormiston pair" was coined by Andy Edwards in 2002 after Ormiston College in Queensland, Australia. - _Amiram Eldar_, Nov 25 2020 %H A072274 Amiram Eldar, <a href="/A072274/b072274.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..7444 from Klaus Brockhaus) %H A072274 Jens Kruse Andersen, <a href="http://primerecords.dk/ormiston_tuples.htm">Ormiston Tuples</a>. %H A072274 Andy Edwards, <a href="https://web.archive.org/web/20200410180154if_/https://aamt.edu.au/content/download/742/19588/file/amt-s.pdf">Ormiston Pairs</a>, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13. %H A072274 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RearrangementPrimePair.html">Rearrangement Prime Pair</a>. %F A072274 a(2k-1)=A069567(k); a(2k)=nextprime(a(2k-1)+1). - _M. F. Hasler_, Oct 13 2012 %e A072274 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.) %t A072274 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}] %o A072274 (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 %o A072274 (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 %o A072274 (Python) %o A072274 from sympy import nextprime %o A072274 from itertools import islice %o A072274 def agen(): # generator of terms %o A072274 p, hp, q, hq = 2, "2", 3, "3" %o A072274 while True: %o A072274 if hp == hq: yield from [p, q] %o A072274 p, q = q, nextprime(q) %o A072274 hp, hq = hq, "".join(sorted(str(q))) %o A072274 print(list(islice(agen(), 38))) # _Michael S. Branicky_, Feb 19 2024 %Y A072274 Cf. A069567. %Y A072274 Cf. A075093 (smallest member of Ormiston prime triple), A161160 (smallest member of Ormiston prime quadruple). %K A072274 base,nonn %O A072274 1,1 %A A072274 Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002 %E A072274 Edited and corrected by _Robert G. Wilson v_, Jul 15 2002