cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A177858 Triangle in which row n gives the number of primes <= 2^n having k 1's in their binary representation, k=1..n.

This page as a plain text file.
%I A177858 #5 Mar 30 2012 17:22:56
%S A177858 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,
%T A177858 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,
%U A177858 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
%N A177858 Triangle in which row n gives the number of primes <= 2^n having k 1's in their binary representation, k=1..n.
%C A177858 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).
%H A177858 T. D. Noe, <a href="/A177858/b177858.txt">Rows n=1..30, flattened</a>
%t A177858 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}]]
%Y A177858 Cf. A061712 (least prime having n 1's)
%K A177858 nonn,tabl
%O A177858 1,5
%A A177858 _T. D. Noe_, May 14 2010