|
|
A141299
|
|
a(n) = number (with repetition) of (not necessarily distinct) substrings in the binary representation of n that each occur multiple times.
|
|
4
|
|
|
0, 0, 2, 2, 2, 2, 5, 5, 4, 6, 3, 4, 3, 5, 9, 9, 7, 7, 5, 7, 11, 7, 6, 7, 5, 7, 6, 7, 6, 9, 14, 14, 11, 10, 8, 12, 10, 8, 8, 10, 10, 17, 12, 8, 12, 10, 10, 11, 8, 8, 8, 8, 12, 12, 8, 10, 8, 10, 8, 11, 10, 14, 20, 20, 16, 14, 12, 14, 13, 11, 11, 14, 19, 14, 11, 13, 11, 11, 12, 14, 13, 14, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Substrings may start with a 0.
|
|
LINKS
|
|
|
EXAMPLE
|
0,0,1,1,10,10 each occur multiple times in binary 1010 = decimal 10. So a(10) = 6.
|
|
MATHEMATICA
|
Array[Function[d, Total@ Select[Tally@ Apply[Join, Map[Partition[d, #, 1] &, Range[Length@ d - 1]]], Last@ # > 1 &][[All, -1]]]@ IntegerDigits[#, 2] &, 83] (* Michael De Vlieger, Oct 23 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|