A372474 Least k such that the k-th prime number has exactly n zeros in its binary expansion.
2, 1, 8, 7, 19, 32, 99, 55, 174, 310, 565, 1029, 1902, 3513, 6544, 6543, 23001, 43395, 82029, 155612, 295957, 564164, 1077901, 3957811, 3965052, 7605342, 14630844, 28194383, 54400029, 105097568, 393615809, 393615807, 762939128, 1480206930, 2874398838, 5586502349
Offset: 0
Examples
The prime numbers A000040(a(n)) together with their binary expansions and binary indices begin: 3: 11 ~ {1,2} 2: 10 ~ {2} 19: 10011 ~ {1,2,5} 17: 10001 ~ {1,5} 67: 1000011 ~ {1,2,7} 131: 10000011 ~ {1,2,8} 523: 1000001011 ~ {1,2,4,10} 257: 100000001 ~ {1,9} 1033: 10000001001 ~ {1,4,11} 2053: 100000000101 ~ {1,3,12} 4099: 1000000000011 ~ {1,2,13} 8209: 10000000010001 ~ {1,5,14} 16417: 100000000100001 ~ {1,6,15} 32771: 1000000000000011 ~ {1,2,16} 65539: 10000000000000011 ~ {1,2,17} 65537: 10000000000000001 ~ {1,17} 262147: 1000000000000000011 ~ {1,2,19} 524353: 10000000000001000001 ~ {1,7,20} 1048609: 100000000000000100001 ~ {1,6,21} 2097169: 1000000000000000010001 ~ {1,5,22} 4194433: 10000000000000010000001 ~ {1,8,23} 8388617: 100000000000000000001001 ~ {1,4,24} 16777729: 1000000000000001000000001 ~ {1,10,25} 67108913: 100000000000000000000110001 ~ {1,5,6,27} 67239937: 100000000100000000000000001 ~ {1,18,27}
Crossrefs
Programs
-
Mathematica
nn=10000; spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&]; dcs=DigitCount[Select[Range[nn],PrimeQ],2,0]; Table[Position[dcs,i][[1,1]],{i,0,spnm[dcs]}]
-
Python
from itertools import count from sympy import isprime, primepi from sympy.utilities.iterables import multiset_permutations def A372474(n): for l in count(n): m = 1<
Chai Wah Wu, May 13 2024
Formula
Extensions
a(22)-a(35) from and offset corrected by Chai Wah Wu, May 13 2024