login
A166396
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.
2
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, 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, 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
OFFSET
1,6
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. 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.
CROSSREFS
Sequence in context: A262666 A124737 A121303 * A152221 A144092 A333467
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Oct 13 2009
EXTENSIONS
More terms from Sean A. Irvine, Mar 02 2010
STATUS
approved