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.

A337258 Primes p such that p and the prime next to p are both digitally balanced numbers in base 2 (A031443).

This page as a plain text file.
%I A337258 #12 Nov 23 2020 02:07:06
%S A337258 37,139,557,563,613,647,653,659,2389,2467,2699,2851,8311,8423,8627,
%T A337258 8677,8681,8807,8819,9011,9043,9049,9157,9319,9323,9419,9613,9803,
%U A337258 9811,9817,9829,9923,10331,10343,10453,10597,11279,11317,11353,11399,11587,11783,11789
%N A337258 Primes p such that p and the prime next to p are both digitally balanced numbers in base 2 (A031443).
%C A337258 Prime p such that p and the prime next to p are both terms of A066196.
%H A337258 Amiram Eldar, <a href="/A337258/b337258.txt">Table of n, a(n) for n = 1..10000</a>
%e A337258 37 is a term since it is a prime number, and both 37 and the next prime, 41, are digitally balanced in base 2: the binary representation of 37 is 100101, the binary representation of 41 is 101001, and both contain 3 0's and 3 1's.
%t A337258 digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; p = Select[Range[3*10^4], PrimeQ]; p[[Position[Partition[digBalQ /@ p, 2, 1], {True, True}] // Flatten]]
%Y A337258 Cf. A031443, A066196, A095018, A337238.
%K A337258 nonn,base
%O A337258 1,1
%A A337258 _Amiram Eldar_, Nov 21 2020