%I #11 Dec 24 2015 10:33:06
%S 1,1,1,4,1,4,4,8,27,30,99,12,169,112,330,40,289,306,494,86,399,484,
%T 690,312,1800,624,918,224,783,780,1240,608,1056,952,1540,684
%N Maximum period of cellular automaton rule 54 in a cyclic universe of width n.
%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Rule54.html">Rule 54</a>
%e For n=8, the initial condition 00011101 yields the evolution
%e 00011101
%e 10100011
%e 01110100
%e 10001110
%e 11010001
%e 00111010
%e 01000111
%e 11101000
%e 00011101
%e Which is period 8, the maximum possible, so a(8)=8.
%t f[list_] := -Subtract @@ Flatten[Map[Position[#, #[[-1]]] &, NestWhileList[CellularAutomaton[54], list, Unequal, All], {0}]]; a[n_] := Max[Table[f[IntegerDigits[i, 2, n]], {i, 0, 2^n - 1}]]; Table[a[n], {n, 1, 10}]
%Y Cf. A071030, A118108
%K nonn
%O 1,4
%A _Ben Branman_, Jan 18 2012
%E a(15)-a(36) from _Lars Blomberg_, Dec 24 2015