A329326 Length of the co-Lyndon factorization of the reversed binary expansion of n.
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 2, 4, 3, 4, 4, 5, 2, 3, 2, 4, 3, 3, 2, 5, 3, 4, 3, 5, 4, 5, 5, 6, 2, 3, 2, 4, 2, 3, 2, 5, 3, 4, 2, 4, 3, 3, 2, 6, 3, 4, 3, 5, 4, 4, 3, 6, 4, 5, 4, 6, 5, 6, 6, 7, 2, 3, 2, 4, 2, 3, 2, 5, 3, 3, 2, 4, 3, 3, 2, 6, 3, 4, 2, 5, 4, 3, 2
Offset: 1
Keywords
Examples
The reversed binary expansion of each positive integer together with their co-Lyndon factorizations begins: 1: (1) = (1) 2: (01) = (0)(1) 3: (11) = (1)(1) 4: (001) = (0)(0)(1) 5: (101) = (10)(1) 6: (011) = (0)(1)(1) 7: (111) = (1)(1)(1) 8: (0001) = (0)(0)(0)(1) 9: (1001) = (100)(1) 10: (0101) = (0)(10)(1) 11: (1101) = (110)(1) 12: (0011) = (0)(0)(1)(1) 13: (1011) = (10)(1)(1) 14: (0111) = (0)(1)(1)(1) 15: (1111) = (1)(1)(1)(1) 16: (00001) = (0)(0)(0)(0)(1) 17: (10001) = (1000)(1) 18: (01001) = (0)(100)(1) 19: (11001) = (1100)(1) 20: (00101) = (0)(0)(10)(1)
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[Reverse[IntegerDigits[n,2]]]],{n,100}]
Comments