login
A341333
Positions of palindromes in the ordering of all 01-words defined at A341258.
3
1, 2, 3, 6, 7, 9, 11, 13, 19, 20, 23, 25, 29, 32, 39, 43, 53, 54, 60, 65, 67, 72, 76, 82, 87, 91, 107, 119, 126, 142, 143, 151, 157, 167, 175, 177, 187, 195, 199, 207, 213, 223, 231, 248, 259, 285, 292, 318, 338, 349, 375, 376, 392, 405, 411, 424, 434, 450
OFFSET
1,2
EXAMPLE
Among the first 20 words (0,1,00,01,10,000,11,001,010,100,000,011,101,0001,110,0010,0100,1000,00000,111), there are 10 palindromes: 0,1,00,000,11,010,000,101,00000,111; these begin at positions 1,2,3,6,7,9,11,13,19, respectively.
MATHEMATICA
z = 800; r = (1 + Sqrt[5])/2;
s = Table[Floor[r*n], {n, 1, z}]; (* A000201 *)
t = Complement[Range[Max[s]], s]; (* A001950 *)
s1[n_] := Length[Intersection[Range[n - 1], s]];
t1[n_] := n - 1 - s1[n];
w[1] = {0}; w[t[[1]]] = {1};
w[n_] := If[MemberQ[s, n], Join[{0}, w[s1[n]]], Join[{1}, w[t1[n]]]]
tt = Table[w[n], {n, 1, z}]; Select[tt, # == Reverse[#] &];
Select[Range[Length[tt]], tt[[#]] == Reverse[tt[[#]]] &] (* A341333 *)
CROSSREFS
Cf. A341258.
Sequence in context: A344954 A181732 A338901 * A190199 A014873 A029467
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 16 2021
STATUS
approved