A177858 Triangle in which row n gives the number of primes <= 2^n having k 1's in their binary representation, k=1..n.
1, 1, 1, 1, 2, 1, 1, 2, 3, 0, 1, 3, 4, 2, 1, 1, 3, 6, 4, 4, 0, 1, 3, 9, 9, 8, 0, 1, 1, 3, 12, 13, 20, 0, 5, 0, 1, 4, 12, 23, 31, 8, 14, 4, 0, 1, 4, 16, 29, 48, 24, 38, 9, 3, 0, 1, 4, 18, 42, 73, 52, 72, 29, 17, 1, 0, 1, 4, 21, 53, 111, 80, 151, 81, 52, 5, 5, 0, 1, 4, 23, 62, 152, 158, 256, 186
Offset: 1
Links
- T. D. Noe, Rows n=1..30, flattened
Crossrefs
Cf. A061712 (least prime having n 1's)
Programs
-
Mathematica
nn=20; cnt=Table[0,{nn}]; Flatten[Table[Do[p=Prime[i]; c=Total[IntegerDigits[p,2]]; cnt[[c]]++, {i, 1+PrimePi[2^(n-1)], PrimePi[2^n]}]; Take[cnt,n], {n,nn}]]
Comments