A141298 a(n) = number of distinct substrings in the binary representation of n that each occur multiple times.
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
Offset: 1
Keywords
Examples
The distinct substrings that occur multiple times in decimal 10 = binary 1010 are 0,1 and 10. So a(10)=3.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Extensions
Extended by Ray Chandler, Jun 25 2009
Comments