login
A260452
Infinite palindromic word (a(1),a(2),a(3),...) with initial word w(1) = (2,1,3) and midword sequence (a(n)); see Comments.
3
2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 2, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1
OFFSET
1,1
COMMENTS
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*.
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.
LINKS
EXAMPLE
w(1) = 213, the initial word.
w(2) = 2132312 ( = 213+2+312, where + = concatenation)
w(3) = w(2)+1+w(2)*
w(4) = w(3)+3+w(3)*
MATHEMATICA
u[1] = {2, 1, 3}; m[1] = {u[1][[1]]};
u[n_] := u[n] = Join[u[n - 1], m[n - 1], Reverse[u[n - 1]]]
m[k_] := {u[k][[k]]}; v = u[8]
CROSSREFS
Sequence in context: A243556 A048233 A287730 * A005679 A232927 A350651
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 24 2015
STATUS
approved