|
|
A141298
|
|
a(n) = number of distinct substrings in the binary representation of n that each occur multiple times.
|
|
4
|
|
|
0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 1, 2, 1, 2, 3, 3, 3, 3, 2, 3, 5, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 4, 4, 4, 3, 5, 4, 3, 3, 4, 4, 7, 5, 3, 5, 4, 3, 4, 3, 3, 3, 3, 5, 5, 2, 4, 3, 4, 2, 4, 3, 4, 5, 5, 5, 5, 4, 5, 5, 4, 4, 5, 8, 5, 4, 5, 4, 4, 4, 5, 5, 5, 4, 7, 9, 5, 6, 4, 4, 5, 8, 4, 6, 5, 4, 5, 4, 4, 4, 5, 4, 5, 3, 4, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
Substrings may start with a 0.
|
|
LINKS
|
|
|
EXAMPLE
|
The distinct substrings that occur multiple times in decimal 10 = binary 1010 are 0,1 and 10. So a(10)=3.
|
|
MATHEMATICA
|
Table[With[{d = IntegerDigits[n, 2]}, Count[Split@ Sort@ Apply[Join, Table[Partition[d, k, 1], {k, Length@ d}]], _?(Length@ # > 1 &)]], {n, 105}] (* Michael De Vlieger, Sep 22 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|