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”).
%I #8 Jan 07 2013 11:48:29
%S 0,0,0,1,0,1,2,2,0,1,0,3,2,3,4,3,0,1,1,2,1,2,0,6,2,3,3,5,5,4,6,4,0,1,
%T 1,2,0,3,2,3,1,3,1,4,1,3,3,8,2,3,4,4,3,5,3,8,5,5,5,6,8,5,8,5,0,1,1,2,
%U 1,2,2,3,1,2,2,4,1,5,3,4,1,3,2,5,2,4,2,6,1,4,3,6,2,6,4,10,2,3,4,4,3
%N Number of times the binary representation of n occurs in the concatenation of the binary representation of all smaller numbers.
%C Related to "early bird" (decimal: A116700, binary: A161373) and Hannah Rollman's numbers (cf. A048991, A048992 for decimal; A118248 and A118247-A118251 for binary versions). The latter would correspond to a variant of this sequence which has indices of nonzero terms omitted from the concatenation.
%e a(3) = 1 since concatenation of 0,1,2 in binary yields "0110", and 3 = "11"[2] occurs once in this string.
%o (PARI) (nMax)->my(c=[],cnt(t,s,M)=M=2^#s-1;sum(i=0,#t-#s,vecextract(t,M<<i)==s));for(n=0,nMax,print1(cnt(c,binary(n))",");c=concat(c,binary(n)))
%K nonn
%O 0,7
%A _M. F. Hasler_, Jan 03 2013