OFFSET
-2,1
LINKS
Fred Lunnon, Pagodas and Sackcloth: Ternary Sequences of Considerable Linear Complexity, Maynooth, July 1997. Also at CiteSeerX.
FORMULA
Repeated iteration of the inflation morphism A -> AB, B -> AD, C -> CB, D -> CD; giving ABADABCDABADCBCDABADABCDCBADCBCD ..., followed by the final morphism A -> 2201, B -> 0211, C -> 0221, D -> 1201 ., giving the Pagoda K_n mod 3 = 22010211 22011201 22010211 02211201 ...
MATHEMATICA
Nest[ Flatten[ # /. {a -> {a, b}, b -> {a, d}, c -> {c, b}, d -> {c, d}}] &, {a}, 5] /. {a -> {2, 2, 0, 1}, b -> {0, 2, 1, 1}, c -> {0, 2, 2, 1}, d -> {1, 2, 0, 1}} // Flatten (* Robert G. Wilson v, Mar 04 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved