login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #7 May 14 2024 09:14:32

%S 3,8,20,23,24,26,30,58,61,63,65,67,78,80,81,82,84,88,185,187,194,200,

%T 201,203,213,214,215,221,225,226,227,234,237,246,249,253,255,256,257,

%U 259,266,270,280,284,287,290,573,578,586,588,591,593,611,614,615,626

%N 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.

%e 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.

%e The primes A000040(a(n)) together with their binary expansions and binary indices begin:

%e 5: 101 ~ {1,3}

%e 19: 10011 ~ {1,2,5}

%e 71: 1000111 ~ {1,2,3,7}

%e 83: 1010011 ~ {1,2,5,7}

%e 89: 1011001 ~ {1,4,5,7}

%e 101: 1100101 ~ {1,3,6,7}

%e 113: 1110001 ~ {1,5,6,7}

%e 271: 100001111 ~ {1,2,3,4,9}

%e 283: 100011011 ~ {1,2,4,5,9}

%e 307: 100110011 ~ {1,2,5,6,9}

%e 313: 100111001 ~ {1,4,5,6,9}

%e 331: 101001011 ~ {1,2,4,7,9}

%e 397: 110001101 ~ {1,3,4,8,9}

%e 409: 110011001 ~ {1,4,5,8,9}

%e 419: 110100011 ~ {1,2,6,8,9}

%e 421: 110100101 ~ {1,3,6,8,9}

%e 433: 110110001 ~ {1,5,6,8,9}

%e 457: 111001001 ~ {1,4,7,8,9}

%e 1103: 10001001111 ~ {1,2,3,4,7,11}

%e 1117: 10001011101 ~ {1,3,4,5,7,11}

%e 1181: 10010011101 ~ {1,3,4,5,8,11}

%e 1223: 10011000111 ~ {1,2,3,7,8,11}

%t Select[Range[1000],DigitCount[Prime[#],2,1]-DigitCount[Prime[#],2,0]==1&]

%Y Restriction of A031448 to the primes, positions of ones in A145037.

%Y Taking primes gives A095073, negative A095072.

%Y Positions of ones in A372516, absolute value A177718.

%Y Cf. A066196, A095070-A095075, A177796, A372539.

%Y A000120 counts ones in binary expansion (binary weight), zeros A080791.

%Y A030190 gives binary expansion, reversed A030308.

%Y A035103 counts zeros in binary expansion of primes, firsts A372474.

%Y A048793 lists binary indices, reverse A272020, sum A029931.

%Y A070939 gives the length of an integer's binary expansion.

%Y A101211 lists run-lengths in binary expansion, row-lengths A069010.

%Y A372471 lists binary indices of primes.

%Y Cf. A000040, A003714, A035100, A037861, A053738, A061712, A066195, A104080, A211997, A372429, A372517, A372686.

%K nonn,base

%O 1,1

%A _Gus Wiseman_, May 13 2024