A075093 Smallest member of Ormiston prime triple.
11117123, 12980783, 14964017, 32638213, 32964341, 33539783, 35868013, 44058013, 46103237, 48015013, 50324237, 52402783, 58005239, 60601237, 61395239, 74699789, 76012879, 78163123, 80905879, 81966341, 82324237
Offset: 1
Examples
The first Ormiston triples are 11117123, 11117213 and 11117321.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..100
Crossrefs
Cf. A069567 - smaller member of an Ormiston prime pair.
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
Comments