OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Jens Kruse Andersen, Ormiston Tuples.
Andy Edwards, Ormiston Pairs, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13.
Giovanni Resta, Ormiston pairs.
Eric Weisstein's World of Mathematics, Rearrangement Prime Pair.
EXAMPLE
11 is a term since 11 and 13 are consecutive primes whose binary representations, 1011 and 1101, are anagrams of each other.
MATHEMATICA
Transpose[Select[Partition[Prime[Range[200]], 2, 1], Sort[IntegerDigits[First[#], 2]] == Sort[IntegerDigits[Last[#], 2]]&]][[1]] (* after Harvey P. Dale at A069567 *)
PROG
(Python)
from sympy import nextprime
from itertools import islice
def hash(n): return "".join(sorted(bin(n)[2:]))
def agen(start=2): # generator of terms
p = nextprime(start-1); q=nextprime(p)
hp, hq = list(map(hash, [p, q]))
while True:
if hp == hq: yield p
p, q = q, nextprime(q)
hp, hq = hq, hash(q)
print(list(islice(agen(), 52))) # Michael S. Branicky, Feb 19 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Nov 22 2020
STATUS
approved