OFFSET
1,1
COMMENTS
Prime p such that p and the prime next to p are both terms of A066196.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
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