login
A038190
Pagoda sequence: a(0) = b(n)-b(n-2) mod 3, where b(n) = A038189(n).
2
2, 2, 0, 1, 0, 2, 1, 1, 2, 2, 0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 0, 2, 1, 1, 0, 2, 2, 1, 1, 2, 0, 1, 2, 2, 0, 1, 0, 2, 1, 1, 2, 2, 0, 1, 1, 2, 0, 1, 0, 2, 2, 1, 0, 2, 1, 1, 0, 2, 2, 1, 1, 2, 0, 1, 2, 2, 0, 1, 0, 2, 1, 1, 2, 2, 0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 0, 2, 1, 1, 0, 2, 2, 1, 1, 2, 0, 1, 0, 2, 2, 1, 0, 2, 1, 1, 2, 2, 0, 1
OFFSET
-2,1
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
Cf. A038189.
Sequence in context: A287443 A039651 A264403 * A279947 A263571 A364060
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved