A329314 Irregular triangle read by rows where row n gives the lengths of the components in the Lyndon factorization of the binary expansion of n.
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, 1, 4, 1, 2, 1, 1, 1, 2, 2, 1, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1
Offset: 0
Examples
Triangle begins: 0: () 20: (1211) 40: (12111) 60: (111111) 1: (1) 21: (122) 41: (123) 61: (11112) 2: (11) 22: (131) 42: (1221) 62: (111111) 3: (11) 23: (14) 43: (15) 63: (111111) 4: (111) 24: (11111) 44: (1311) 64: (1111111) 5: (12) 25: (113) 45: (132) 65: (16) 6: (111) 26: (1121) 46: (141) 66: (151) 7: (111) 27: (113) 47: (15) 67: (16) 8: (1111) 28: (11111) 48: (111111) 68: (1411) 9: (13) 29: (1112) 49: (114) 69: (16) 10: (121) 30: (11111) 50: (1131) 70: (151) 11: (13) 31: (11111) 51: (114) 71: (16) 12: (1111) 32: (111111) 52: (11211) 72: (13111) 13: (112) 33: (15) 53: (1122) 73: (133) 14: (1111) 34: (141) 54: (1131) 74: (151) 15: (1111) 35: (15) 55: (114) 75: (16) 16: (11111) 36: (1311) 56: (111111) 76: (1411) 17: (14) 37: (15) 57: (1113) 77: (16) 18: (131) 38: (141) 58: (11121) 78: (151) 19: (14) 39: (15) 59: (1113) 79: (16)
Crossrefs
Programs
-
Mathematica
lynQ[q_]:=Array[Union[{q,RotateRight[q,#]}]=={q,RotateRight[q,#]}&,Length[q]-1,1,And]; lynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[lynfac[Drop[q,i]],Take[q,i]]][Last[Select[Range[Length[q]],lynQ[Take[q,#1]]&]]]]; Table[Length/@lynfac[If[n==0,{},IntegerDigits[n,2]]],{n,0,50}]
Comments