%I #7 Mar 11 2014 01:32:49
%S 0,1,0,1,1,2,0,1,1,1,2,3,3,3,0,1,1,1,3,2,1,3,2,3,3,3,3,4,5,4,0,1,1,1,
%T 3,1,2,3,3,2,3,1,3,6,3,4,2,3,3,3,3,5,3,3,4,5,4,5,5,5,7,5,0,1,1,1,3,1,
%U 2,3,4,2,1,3,4,3,5,4,3,2,2,3,6,3,1,5,3,6,6,4,3,7,5,5,2,3,3,3,3,3,5,3,4,5,6
%N a(n) = the number of distinct positive decimal values k of substrings in the binary representation of n where k+1 is also the value of at least one substring in the binary representation of n.
%C A166395(n) = A166396(n) + 1 if n is not of the form 2^m -1. A166395(2^m -1) = A166396(2^m -1) = 0, for all m.
%e 13 in binary is 1101. 1 and 10 (2 in decimal) both occur as substrings in 1101. 10 and 11 (3 in decimal) both occur as substrings. And 101 (5 in decimal) and 110 (6 in decimal) both occur as substrings. Since there are three positive values k where both binary k and binary k+1 also occurs as a substring in 1101, then a(13) = 3.
%Y Cf. A166395
%K base,nonn
%O 1,6
%A _Leroy Quet_, Oct 13 2009
%E More terms from _Sean A. Irvine_, Mar 02 2010