A187752 Number of times the binary representation of n occurs in the concatenation of the binary representation of all smaller numbers.
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, 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, 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
Offset: 0
Keywords
Examples
a(3) = 1 since concatenation of 0,1,2 in binary yields "0110", and 3 = "11"[2] occurs once in this string.
Programs
-
PARI
(nMax)->my(c=[],cnt(t,s,M)=M=2^#s-1;sum(i=0,#t-#s,vecextract(t,M<
Comments