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.

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

This page as a plain text file.
%I A339080 #14 Feb 16 2025 08:34:01
%S A339080 11,23,37,59,83,103,107,131,139,151,167,173,179,199,227,229,263,277,
%T A339080 347,409,419,439,487,491,503,557,563,613,647,653,659,683,719,727,757,
%U A339080 811,823,827,839,853,911,941,947,953,967,997,1019,1063,1091,1093,1123,1163
%N A339080 Smaller members of binary Ormiston prime pairs: two consecutive primes whose binary representations are anagrams of each other.
%C A339080 Equivalently, the smaller of two consecutive primes with the same length of binary representation (A070939) and the same binary weight (A000120).
%H A339080 Amiram Eldar, <a href="/A339080/b339080.txt">Table of n, a(n) for n = 1..10000</a>
%H A339080 Jens Kruse Andersen, <a href="http://primerecords.dk/ormiston_tuples.htm">Ormiston Tuples</a>.
%H A339080 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 A339080 Giovanni Resta, <a href="https://www.numbersaplenty.com/set/Ormiston_pair">Ormiston pairs</a>.
%H A339080 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RearrangementPrimePair.html">Rearrangement Prime Pair</a>.
%e A339080 11 is a term since 11 and 13 are consecutive primes whose binary representations, 1011 and 1101, are anagrams of each other.
%t A339080 Transpose[Select[Partition[Prime[Range[200]], 2, 1], Sort[IntegerDigits[First[#],2]] == Sort[IntegerDigits[Last[#],2]]&]][[1]] (* after _Harvey P. Dale_ at A069567 *)
%o A339080 (Python)
%o A339080 from sympy import nextprime
%o A339080 from itertools import islice
%o A339080 def hash(n): return "".join(sorted(bin(n)[2:]))
%o A339080 def agen(start=2): # generator of terms
%o A339080     p = nextprime(start-1); q=nextprime(p)
%o A339080     hp, hq = list(map(hash, [p, q]))
%o A339080     while True:
%o A339080         if hp == hq: yield p
%o A339080         p, q = q, nextprime(q)
%o A339080         hp, hq = hq, hash(q)
%o A339080 print(list(islice(agen(), 52))) # _Michael S. Branicky_, Feb 19 2024
%Y A339080 Cf. A000120, A069567 (decimal analog), A070939, A072274.
%K A339080 nonn,base
%O A339080 1,1
%A A339080 _Amiram Eldar_, Nov 22 2020