OFFSET
1,5
COMMENTS
Every row begins with 1 because 2 is the only prime having one 1 in its binary representation. A row ends in 1 or 0, depending on whether 2^n-1 is prime or composite. The sum of terms in row n is A007053(n).
LINKS
T. D. Noe, Rows n=1..30, flattened
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}]]
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
T. D. Noe, May 14 2010
STATUS
approved