login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339080 Smaller members of binary Ormiston prime pairs: two consecutive primes whose binary representations are anagrams of each other. 2

%I #13 Feb 19 2024 07:31:48

%S 11,23,37,59,83,103,107,131,139,151,167,173,179,199,227,229,263,277,

%T 347,409,419,439,487,491,503,557,563,613,647,653,659,683,719,727,757,

%U 811,823,827,839,853,911,941,947,953,967,997,1019,1063,1091,1093,1123,1163

%N Smaller members of binary Ormiston prime pairs: two consecutive primes whose binary representations are anagrams of each other.

%C Equivalently, the smaller of two consecutive primes with the same length of binary representation (A070939) and the same binary weight (A000120).

%H Amiram Eldar, <a href="/A339080/b339080.txt">Table of n, a(n) for n = 1..10000</a>

%H Jens Kruse Andersen, <a href="http://primerecords.dk/ormiston_tuples.htm">Ormiston Tuples</a>.

%H Andy Edwards, <a href="https://web.archive.org/web/20200410180154if_/https://aamt.edu.au/content/download/742/19588/file/amt-s.pdf">Ormiston Pairs</a>, Australian Mathematics Teacher, Vol. 58, No. 2 (2002), pp. 12-13.

%H Giovanni Resta, <a href="https://www.numbersaplenty.com/set/Ormiston_pair">Ormiston pairs</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RearrangementPrimePair.html">Rearrangement Prime Pair</a>.

%e 11 is a term since 11 and 13 are consecutive primes whose binary representations, 1011 and 1101, are anagrams of each other.

%t Transpose[Select[Partition[Prime[Range[200]], 2, 1], Sort[IntegerDigits[First[#],2]] == Sort[IntegerDigits[Last[#],2]]&]][[1]] (* after _Harvey P. Dale_ at A069567 *)

%o (Python)

%o from sympy import nextprime

%o from itertools import islice

%o def hash(n): return "".join(sorted(bin(n)[2:]))

%o def agen(start=2): # generator of terms

%o p = nextprime(start-1); q=nextprime(p)

%o hp, hq = list(map(hash, [p, q]))

%o while True:

%o if hp == hq: yield p

%o p, q = q, nextprime(q)

%o hp, hq = hq, hash(q)

%o print(list(islice(agen(), 52))) # _Michael S. Branicky_, Feb 19 2024

%Y Cf. A000120, A069567 (decimal analog), A070939, A072274.

%K nonn,base

%O 1,1

%A _Amiram Eldar_, Nov 22 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 03:33 EDT 2024. Contains 371767 sequences. (Running on oeis4.)