login
a(n) = the number of distinct nonnegative 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.
2

%I #7 Mar 11 2014 01:32:48

%S 0,2,0,2,2,3,0,2,2,2,3,4,4,4,0,2,2,2,4,3,2,4,3,4,4,4,4,5,6,5,0,2,2,2,

%T 4,2,3,4,4,3,4,2,4,7,4,5,3,4,4,4,4,6,4,4,5,6,5,6,6,6,8,6,0,2,2,2,4,2,

%U 3,4,5,3,2,4,5,4,6,5,4,3,3,4,7,4,2,6,4,7,7,5,4,8,6,6,3,4,4,4,4,4,6,4,5,6,7

%N a(n) = the number of distinct nonnegative 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. 0 and 1 both occur as substrings in 1101. 1 and 10 (2 in decimal) both occur as substrings. 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 four values k where both binary k and binary k+1 also occurs as a substring in 1101, then a(13) = 4.

%Y Cf. A166396

%K base,nonn

%O 1,2

%A _Leroy Quet_, Oct 13 2009

%E Definition corrected by _Sean A. Irvine_, Mar 02 2010

%E More terms from _Sean A. Irvine_, Mar 02 2010