%I #8 Jul 31 2021 19:12:54
%S 1,0,0,0,1,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,
%T 1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,
%U 0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1
%N String substitution 0 -> 01110, 1 -> 10001, started with 1.
%C Connected to the Koch curve by doing the following repeatedly: Go one step; turn left if there is 01 or 10 in S and right if there is 00 or 11 in S. Go to the next element of the sequence.
%F s(0)=0,1,1,1,0 and s(1)=1,0,0,0,1 Then S = lim s^n (n to infinity)
%t s[0] = {0, 1, 1, 1, 0}; s[1] = {1, 0, 0, 0, 1}; sf[l_] := Module[{out = {}}, For[i = 1, i <= Length[l], i++, next = l[[i]]; AppendTo[out, s[next]]]; Return[Flatten[out]]] k = 7; e = {0}; For[m = 1, m <= k, m++, e = sf[e]]; e
%t Nest[Flatten[#/.{0->{0,1,1,1,0},1->{1,0,0,0,1}}]&,1,6] (* _Harvey P. Dale_, Jul 31 2021 *)
%K nonn,uned
%O 1,1
%A Stephan Rosebrock (rosebrock(AT)ph-karlsruhe.de), Oct 10 2009
%E a(25+) corrected by _Ryan Hendrickson_, Apr 10 2011