login
A166395
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
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, 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, 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
OFFSET
1,2
COMMENTS
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.
EXAMPLE
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.
CROSSREFS
Sequence in context: A339434 A348325 A103863 * A061199 A352128 A334203
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Oct 13 2009
EXTENSIONS
Definition corrected by Sean A. Irvine, Mar 02 2010
More terms from Sean A. Irvine, Mar 02 2010
STATUS
approved