A372538 Numbers k such that the number of ones minus the number of zeros in the binary expansion of the k-th prime number is 1.
3, 8, 20, 23, 24, 26, 30, 58, 61, 63, 65, 67, 78, 80, 81, 82, 84, 88, 185, 187, 194, 200, 201, 203, 213, 214, 215, 221, 225, 226, 227, 234, 237, 246, 249, 253, 255, 256, 257, 259, 266, 270, 280, 284, 287, 290, 573, 578, 586, 588, 591, 593, 611, 614, 615, 626
Offset: 1
Examples
The binary expansion of 83 is (1,0,1,0,0,1,1) with ones minus zeros 4 - 3 = 1, and 83 is the 23rd prime, so 23 is in the sequence. The primes A000040(a(n)) together with their binary expansions and binary indices begin: 5: 101 ~ {1,3} 19: 10011 ~ {1,2,5} 71: 1000111 ~ {1,2,3,7} 83: 1010011 ~ {1,2,5,7} 89: 1011001 ~ {1,4,5,7} 101: 1100101 ~ {1,3,6,7} 113: 1110001 ~ {1,5,6,7} 271: 100001111 ~ {1,2,3,4,9} 283: 100011011 ~ {1,2,4,5,9} 307: 100110011 ~ {1,2,5,6,9} 313: 100111001 ~ {1,4,5,6,9} 331: 101001011 ~ {1,2,4,7,9} 397: 110001101 ~ {1,3,4,8,9} 409: 110011001 ~ {1,4,5,8,9} 419: 110100011 ~ {1,2,6,8,9} 421: 110100101 ~ {1,3,6,8,9} 433: 110110001 ~ {1,5,6,8,9} 457: 111001001 ~ {1,4,7,8,9} 1103: 10001001111 ~ {1,2,3,4,7,11} 1117: 10001011101 ~ {1,3,4,5,7,11} 1181: 10010011101 ~ {1,3,4,5,8,11} 1223: 10011000111 ~ {1,2,3,7,8,11}
Crossrefs
Programs
-
Mathematica
Select[Range[1000],DigitCount[Prime[#],2,1]-DigitCount[Prime[#],2,0]==1&]