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.

This page as a plain text file.
%I A075093 #23 Feb 19 2024 07:35:08
%S A075093 11117123,12980783,14964017,32638213,32964341,33539783,35868013,
%T A075093 44058013,46103237,48015013,50324237,52402783,58005239,60601237,
%U A075093 61395239,74699789,76012879,78163123,80905879,81966341,82324237
%N A075093 Smallest member of Ormiston prime triple.
%C A075093 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
%H A075093 Reinhard Zumkeller, <a href="/A075093/b075093.txt">Table of n, a(n) for n = 1..100</a>
%e A075093 The first Ormiston triples are 11117123, 11117213 and 11117321.
%t A075093 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}]
%t A075093 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 *)
%o A075093 (Haskell)
%o A075093 a075093 n = a075093_list !! (n-1)
%o A075093 a075093_list = f a000040_list where
%o A075093    f (p:ps@(q:r:_)) =
%o A075093      if sort (show p) == sort (show q) && sort (show q) == sort (show r)
%o A075093         then p : f ps else f ps
%o A075093 -- _Reinhard Zumkeller_, Mar 09 2012
%o A075093 (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
%o A075093 (Python)
%o A075093 from sympy import nextprime
%o A075093 from itertools import islice
%o A075093 def hash(n): return "".join(sorted(str(n)))
%o A075093 def agen(start=2): # generator of terms
%o A075093     p = nextprime(start-1); q=nextprime(p); r=nextprime(q)
%o A075093     hp, hq, hr = list(map(hash, [p, q, r]))
%o A075093     while True:
%o A075093         if hp == hq == hr: yield p
%o A075093         p, q, r = q, r, nextprime(r)
%o A075093         hp, hq, hr = hq, hr, hash(r)
%o A075093 print(list(islice(agen(), 3))) # _Michael S. Branicky_, Feb 19 2024
%Y A075093 Cf. A069567 - smaller member of an Ormiston prime pair.
%Y A075093 Cf. A072274, A161160, A066540. - _M. F. Hasler_, Oct 11 2012
%K A075093 base,nonn
%O A075093 1,1
%A A075093 _Robert G. Wilson v_, Aug 31 2002