A069567
Smaller of two consecutive primes which are anagrams of each other.
Original entry on oeis.org
1913, 18379, 19013, 25013, 34613, 35617, 35879, 36979, 37379, 37813, 40013, 40213, 40639, 45613, 48091, 49279, 51613, 55313, 56179, 56713, 58613, 63079, 63179, 64091, 65479, 66413, 74779, 75913, 76213, 76579, 76679, 85313, 88379, 90379, 90679, 93113, 94379, 96079
Offset: 1
1913 and 1931 are two successive primes.
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).
- Andy Edwards, Ormiston Pairs, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13.
-
import Data.List (sort)
a069567 n = a069567_list !! (n-1)
a069567_list = f a000040_list where
f (p:ps@(p':_)) = if sort (show p) == sort (show p')
then p : f ps else f ps
-- Reinhard Zumkeller, Apr 03 2015
-
N:= 10^6: # to get all terms <= N
R:= NULL: p:= 3: q:= 5:
while p <= N do
p:= q;
q:= nextprime(q);
if q-p mod 18 = 0 and sort(convert(p,base,10)) = sort(convert(q,base,10)) then
R:= R, p
fi
od:
R; # Robert Israel, Feb 23 2017
-
Prime[ Select[ Range[10^4], Sort[ IntegerDigits[ Prime[ # ]]] == Sort[ IntegerDigits[ Prime[ # + 1]]] & ]]
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}]
Transpose[Select[Partition[Prime[Range[8600]],2,1],Sort[IntegerDigits[ First[#]]] == Sort[ IntegerDigits[Last[#]]]&]][[1]] (* Harvey P. Dale, Mar 06 2012 *)
-
is(n)=isprime(n)&&vecsort(Vec(Str(n)))==vecsort(Vec(Str(nextprime(n+1)))) \\ Charles R Greathouse IV, Aug 09 2011
-
p=2;forprime(q=3,1e5,if((q-p)%18==0&&vecsort(Vec(Str(p)))==vecsort(Vec(Str(q))),print1(p", "));p=q) \\ Charles R Greathouse IV, Aug 09 2011, minor edits by M. F. Hasler, Oct 11 2012
-
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 p
p, q = q, nextprime(q)
hp, hq = hq, "".join(sorted(str(q)))
print(list(islice(agen(), 38))) # Michael S. Branicky, Feb 19 2024
Comments and references from Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002
A072274
List of Ormiston prime pairs.
Original entry on oeis.org
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
Andy Edwards (AndynGen(AT)aol.com), Jul 09 2002
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.)
Cf.
A075093 (smallest member of Ormiston prime triple),
A161160 (smallest member of Ormiston prime quadruple).
-
&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
-
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}]
-
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
-
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
A161160
Smallest member of Ormiston prime quadruple.
Original entry on oeis.org
6607882123, 7768673789, 11550316123, 13978938739, 16819885123, 20316483739, 31542480917, 36739640911, 38132974739, 40224610913, 44453840917, 45078784789, 48421320917, 48789908137, 53623243789, 54120163789, 54936260123, 56168170789
Offset: 1
The first Ormiston quadruple is (6607882123,6607882213,6607882231,6607882321).
A247305
The smaller of two consecutive triangular numbers which are permutations of each other.
Original entry on oeis.org
404550, 2653056, 3643650, 5633046, 6413571, 10122750, 10656036, 13762881, 19841850, 26634051, 32800950, 47848653, 56769840, 71634465, 89184690, 103672800, 137108520, 317053971, 345069585, 392714325, 408508236, 440762895, 508948560, 598735710, 718830486, 825215625
Offset: 1
a(1) = 404550 is in the sequence because {404550 and 405450} are a pair of consecutive triangular numbers having exactly the same digits.
a(2) = 2653056 is in the sequence because {2653056 and 2655360} are two consecutive triangular numbers having exactly the same digits.
-
A247305 = {}; a = {1}; b = {2}; Do[t1 = n*(n + 1)/2; t2 = (n - 1)*(n - 1 + 1)/2; b = Sort[IntegerDigits[t1]]; If[a == b, AppendTo[A247305, t2]]; a = b, {n, 2, 7*10^4}]; A247305
-
lista(nn) = {for (n=1, nn, dt = vecsort(digits(t=n*(n+1)/2)); dnt = vecsort(digits((n+1)*(n+2)/2)); if (dt == dnt, print1(t, ", ")););} \\ Michel Marcus, Sep 13 2014
A217372
Initial prime in the first Ormiston n-tuple.
Original entry on oeis.org
2, 1913, 11117123, 6607882123, 20847942560791
Offset: 1
(1913, 1931) is the first case of two consecutive primes with the same digits. The first 3-, 4- and 5-tuples are: (11117123, 11117213, 11117321), (6607882123, 6607882213, 6607882231, 6607882321), (20847942560791, 20847942560917, 20847942560971, 20847942561079, 20847942561097).
A217797
Smallest member of Ormiston prime 5-tuple.
Original entry on oeis.org
20847942560791, 21815124622913, 35581541330719, 40546521517819, 47950363950791, 54808830290791, 65923105730719, 84573572180719, 85950417240719
Offset: 1
a(1) is in the sequence since (20847942560791, 20847942560917, 20847942560971, 20847942561079, 20847942561097) are 5 consecutive primes whose decimal representations contain exactly the same digits.
Showing 1-6 of 6 results.
Comments