A141299 a(n) = number (with repetition) of (not necessarily distinct) substrings in the binary representation of n that each occur multiple times.
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
Offset: 1
Keywords
Examples
0,0,1,1,10,10 each occur multiple times in binary 1010 = decimal 10. So a(10) = 6.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..16384
Programs
-
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 *)
Extensions
Extended by Ray Chandler, Jun 25 2009
Comments