login
A337258
Primes p such that p and the prime next to p are both digitally balanced numbers in base 2 (A031443).
2
37, 139, 557, 563, 613, 647, 653, 659, 2389, 2467, 2699, 2851, 8311, 8423, 8627, 8677, 8681, 8807, 8819, 9011, 9043, 9049, 9157, 9319, 9323, 9419, 9613, 9803, 9811, 9817, 9829, 9923, 10331, 10343, 10453, 10597, 11279, 11317, 11353, 11399, 11587, 11783, 11789
OFFSET
1,1
COMMENTS
Prime p such that p and the prime next to p are both terms of A066196.
LINKS
EXAMPLE
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.
MATHEMATICA
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]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Nov 21 2020
STATUS
approved