A214521 List of words over {1,4} with equal numbers of 1's and 4's.
14, 41, 1144, 1414, 1441, 4114, 4141, 4411, 111444, 114144, 114414, 114441, 141144, 141414, 141441, 144114, 144141, 144411, 411144, 411414, 411441, 414114, 414141, 414411, 441114, 441141, 441411, 444111, 11114444, 11141444
Offset: 1
Programs
-
Mathematica
Sort[FromDigits/@Flatten[Table[Permutations[PadRight[{},2n,{1,4}]],{n,4}],1]] (* Harvey P. Dale, Aug 30 2016 *)
Comments