A329327 Numbers whose binary expansion has Lyndon factorization of length 2 (the minimum for n > 1).
2, 3, 5, 9, 11, 17, 19, 23, 33, 35, 37, 39, 43, 47, 65, 67, 69, 71, 75, 77, 79, 87, 95, 129, 131, 133, 135, 137, 139, 141, 143, 147, 149, 151, 155, 157, 159, 171, 175, 183, 191, 257, 259, 261, 263, 265, 267, 269, 271, 275, 277, 279, 281, 283, 285, 287, 293
Offset: 1
Keywords
Examples
The binary expansion of each term together with its Lyndon factorization begins: 2: (10) = (1)(0) 3: (11) = (1)(1) 5: (101) = (1)(01) 9: (1001) = (1)(001) 11: (1011) = (1)(011) 17: (10001) = (1)(0001) 19: (10011) = (1)(0011) 23: (10111) = (1)(0111) 33: (100001) = (1)(00001) 35: (100011) = (1)(00011) 37: (100101) = (1)(00101) 39: (100111) = (1)(00111) 43: (101011) = (1)(01011) 47: (101111) = (1)(01111) 65: (1000001) = (1)(000001) 67: (1000011) = (1)(000011) 69: (1000101) = (1)(000101) 71: (1000111) = (1)(000111) 75: (1001011) = (1)(001011) 77: (1001101) = (1)(001101)
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]]&]]]]; Select[Range[100],Length[lynfac[IntegerDigits[#,2]]]==2&]
Formula
a(n) = A339608(n) + 1. - Harald Korneliussen, Mar 12 2020
Comments