OFFSET
1,1
EXAMPLE
The binary expansion of 17 is (1,0,0,0,1) with ones minus zeros 2 - 3 = -1, and 17 is the 7th prime, 7 is in the sequence.
The primes A000040(a(n)) together with their binary expansions and binary indices begin:
17: 10001 ~ {1,5}
67: 1000011 ~ {1,2,7}
73: 1001001 ~ {1,4,7}
97: 1100001 ~ {1,6,7}
263: 100000111 ~ {1,2,3,9}
269: 100001101 ~ {1,3,4,9}
277: 100010101 ~ {1,3,5,9}
281: 100011001 ~ {1,4,5,9}
293: 100100101 ~ {1,3,6,9}
337: 101010001 ~ {1,5,7,9}
353: 101100001 ~ {1,6,7,9}
389: 110000101 ~ {1,3,8,9}
401: 110010001 ~ {1,5,8,9}
449: 111000001 ~ {1,7,8,9}
1039: 10000001111 ~ {1,2,3,4,11}
1051: 10000011011 ~ {1,2,4,5,11}
1063: 10000100111 ~ {1,2,3,6,11}
1069: 10000101101 ~ {1,3,4,6,11}
1109: 10001010101 ~ {1,3,5,7,11}
1123: 10001100011 ~ {1,2,6,7,11}
1129: 10001101001 ~ {1,4,6,7,11}
1163: 10010001011 ~ {1,2,4,8,11}
MATHEMATICA
Select[Range[1000], DigitCount[Prime[#], 2, 1]-DigitCount[Prime[#], 2, 0]==-1&]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, May 14 2024
STATUS
approved