%I #7 Mar 12 2014 16:36:47
%S 1,2,3,3,1,1,2,2,1,1,1,1,3,2,1,2,1,1,1,2,1,3,1,1,2,2,1,1,1,1,3,2,1,2,
%T 1,1,1,2,1,3,1,1,2,2,1,1,1,1,3,2,1,2,1,1,1,2,1,3,1,1,2,2,1,1,1,1,3,2,
%U 1,2,1,1,1,2,1,3,1,1,2,2,1,1,1,1,3,2,1,2,1,1,1,2,1,3,1,1,2,2,1,1,1,1,3,2,1
%N Functional substitution on {1,2,3}.
%C Based on a prime digits function modulo 10, reduced here to modulo 3.
%C Appears to be 12-periodic for n>3.
%F ar={1, 2, 3} a(n)=b(m, i) = 1 + Mod[ar[[i]]*(1 + Mod[m, 3]), 3]
%t ar = {1, 2, 3} f[n_] := 1 + Mod[ar*(1 + Mod[n, 3]), 3] br = NestList[f, ar, Floor[200/3]] a = Flatten[br]
%K nonn,uned
%O 1,2
%A _Roger L. Bagula_, Apr 12 2005