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.

A075093 Smallest member of Ormiston prime triple.

Original entry on oeis.org

11117123, 12980783, 14964017, 32638213, 32964341, 33539783, 35868013, 44058013, 46103237, 48015013, 50324237, 52402783, 58005239, 60601237, 61395239, 74699789, 76012879, 78163123, 80905879, 81966341, 82324237
Offset: 1

Views

Author

Robert G. Wilson v, Aug 31 2002

Keywords

Comments

A subsequence of A069567 which is in turn a subsequence of A072274. More precisely, this A075093 lists exactly the terms which precede repeated elements in A072274, since an Ormiston triple (p,q,r), i.e., three consecutive primes whose decimal representations are anagrams of each other, corresponds to two pairs (p,q) and (q,r), so that p=a(n) implies p=A072274(2k-1)=A069567(k) for some k, and q=A072274(2k)=A072274(2k+1)=A069567(k+1) and r=A072274(2k+2). - M. F. Hasler, Oct 11 2012

Examples

			The first Ormiston triples are 11117123, 11117213 and 11117321.
		

Crossrefs

Cf. A069567 - smaller member of an Ormiston prime pair.
Cf. A072274, A161160, A066540. - M. F. Hasler, Oct 11 2012

Programs

  • Haskell
    a075093 n = a075093_list !! (n-1)
    a075093_list = f a000040_list where
       f (p:ps@(q:r:_)) =
         if sort (show p) == sort (show q) && sort (show q) == sort (show r)
            then p : f ps else f ps
    -- Reinhard Zumkeller, Mar 09 2012
    
  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = 0; b = 1; Do[c = NextPrim[b]; If[ Sort[ IntegerDigits[a]] == Sort[ IntegerDigits[b]] == Sort[ IntegerDigits[c]], Print[a]]; a = b; b = c, {n, 1, 10^7}]
    op3Q[{a_,b_,c_}]:=Sort[IntegerDigits[a]]==Sort[IntegerDigits[b]] == Sort[ IntegerDigits[ c]]; Transpose[Select[Partition[Prime[ Range[ 5000000]],3,1], op3Q]][[1]] (* Harvey P. Dale, Jun 16 2014 *)
  • PARI
    is_A075093(n)={isprime(n) & vecsort(Vec(Str(n)))==vecsort(Vec(Str(n=nextprime(n+1)))) & vecsort(Vec(Str(n)))==vecsort(Vec(Str(nextprime(n+1))))} \\ M. F. Hasler, Oct 11 2012
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def hash(n): return "".join(sorted(str(n)))
    def agen(start=2): # generator of terms
        p = nextprime(start-1); q=nextprime(p); r=nextprime(q)
        hp, hq, hr = list(map(hash, [p, q, r]))
        while True:
            if hp == hq == hr: yield p
            p, q, r = q, r, nextprime(r)
            hp, hq, hr = hq, hr, hash(r)
    print(list(islice(agen(), 3))) # Michael S. Branicky, Feb 19 2024