Rule 158 is one of the elementary cellular automaton rules introduced by Stephen Wolfram in 1983 (Wolfram 1983, 2002). It specifies the next color in a cell, depending on its color and its immediate neighbors. Its rule outcomes are encoded in the binary representation . This rule is illustrated above together with the evolution of a single black cell it produces after 15 steps (Wolfram 2002, p. 55).
The mirror image, complement, and mirror complement are rules 214, 134, and 148, respectively.
Starting with a single black cell, successive generations , 1, ... are given by interpreting the numbers 1, 7, 29, 115, 477, 1843, 7645, ... (OEIS A118171) in binary, namely 1, 111, 11101, 1110011, 111011101, ... (OEIS A118172).
The decimal value of the th iteration is given in closed form by
(E. W. Weisstein, Apr. 13, 2006), so computation of rule 54 is computationally reducible for an initial configuration consisting of a single black cell. has generating function