A329312 Length of the co-Lyndon factorization of the binary expansion of n.
1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 3, 1, 2, 1, 4, 1, 2, 2, 3, 1, 3, 2, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 2, 3, 2, 3, 2, 4, 1, 2, 3, 4, 2, 3, 2, 5, 1, 2, 1, 3, 1, 2, 2, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 2, 3, 2, 3, 2, 4, 1, 3, 3, 4, 2, 3, 2, 5, 1, 2, 2, 3, 1, 4, 3
Offset: 1
Keywords
Examples
The binary indices of 1..20 together with their co-Lyndon factorizations are: 1: (1) = (1) 2: (10) = (10) 3: (11) = (1)(1) 4: (100) = (100) 5: (101) = (10)(1) 6: (110) = (110) 7: (111) = (1)(1)(1) 8: (1000) = (1000) 9: (1001) = (100)(1) 10: (1010) = (10)(10) 11: (1011) = (10)(1)(1) 12: (1100) = (1100) 13: (1101) = (110)(1) 14: (1110) = (1110) 15: (1111) = (1)(1)(1)(1) 16: (10000) = (10000) 17: (10001) = (1000)(1) 18: (10010) = (100)(10) 19: (10011) = (100)(1)(1) 20: (10100) = (10100)
Crossrefs
Programs
-
Mathematica
colynQ[q_]:=Array[Union[{RotateRight[q,#],q}]=={RotateRight[q,#],q}&,Length[q]-1,1,And]; colynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[colynfac[Drop[q,i]],Take[q,i]]]@Last[Select[Range[Length[q]],colynQ[Take[q,#]]&]]]; Table[Length[colynfac[IntegerDigits[n,2]]],{n,100}]
Comments