%I #17 Aug 27 2015 11:20:46
%S 1,2,3,1,3,2,1,2,1,2,3,1,3,2,1,3,1,2,3,1,3,2,1,2,1,2,3,1,3,2,1,1,1,2,
%T 3,1,3,2,1,2,1,2,3,1,3,2,1,3,1,2,3,1,3,2,1,2,1,2,3,1,3,2,1,3,1,2,3,1,
%U 3,2,1,2,1,2,3,1,3,2,1,3,1,2,3,1,3,2
%N Infinite palindromic word (a(1),a(2),a(3),...) with initial word w(1) = (1,2,3) and midword sequence (a(n)); see Comments.
%C Below, w* denotes the reversal of a word w, and "sequence" and "word" are interchangable. An infinite word is palindromic if it has infinitely many initial subwords w such that w = w*.
%C Many infinite palindromic words (a(1),a(2),...) are determined by an initial word w and a midword sequence (m(1),m(2),...) of palindromes, as follows: for given w of length k, take w(1) = w = (a(1),a(2),...,a(k)). Form the palindrome w(2) = w(1)m(1)w(1)* by concatenating w(1), m(1), and w(1)*. Continue inductively; i.e., w(n+1) = w(n)m(n)w(n)* for all n >= 1. See A260390 for examples.
%C As a symmetrical triangle:
%C ...............................1
%C ............................1231321
%C ........................123132121231321
%C ................1231321212313213123132121231321
%C 123132121231321312313212123132111231321212313213123132121231321
%C ...
%H Clark Kimberling, <a href="/A260449/b260449.txt">Table of n, a(n) for n = 1..10000</a>
%e w(1) = 123, the initial word.
%e w(2) = 1231321 ( = 123+1+321, where + = concatenation)
%e w(3) = w(2)+2+w(2)*
%e w(4) = w(3)+3+w(3)*
%t u[1] = {1, 2, 3}; m[1] = {u[1][[1]]};
%t u[n_] := u[n] = Join[u[n - 1], m[n - 1], Reverse[u[n - 1]]]
%t m[k_] := {u[k][[k]]}; v = u[8]; (* A260449 *)
%t Flatten[Position[v, 1]] (* A260395 *)
%t Flatten[Position[v, 2]] (* A260400 *)
%t Flatten[Position[v, 3]] (* A260398 *)
%Y Cf. A260390.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_, Aug 22 2015