cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A265379 Binary representation of the n-th iteration of the "Rule 158" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 111, 11101, 1110011, 111011101, 11100110011, 1110111011101, 111001100110011, 11101110111011101, 1110011001100110011, 111011101110111011101, 11100110011001100110011, 1110111011101110111011101, 111001100110011001100110011, 11101110111011101110111011101
Offset: 0

Views

Author

Robert Price, Dec 07 2015

Keywords

Examples

			From _Michael De Vlieger_, Dec 09 2015: (Start)
First 12 rows:
                        1
                      1 1 1
                    1 1 1 0 1
                  1 1 1 0 0 1 1
                1 1 1 0 1 1 1 0 1
              1 1 1 0 0 1 1 0 0 1 1
            1 1 1 0 1 1 1 0 1 1 1 0 1
          1 1 1 0 0 1 1 0 0 1 1 0 0 1 1
        1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1
      1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
    1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1
  1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1
(End)
		

Crossrefs

Cf. A071037 (cells), A118171 (decimal).

Programs

  • Mathematica
    rule = 158; rows = 20; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]]], {k,1,rows}]
  • Python
    print([(11100 - (n%2))*100**n//9999 for n in range(30)]) # Karl V. Keller, Jr., Sep 20 2021

Formula

From Colin Barker, Dec 14 2015 and Apr 18 2019: (Start)
a(n) = 10001*a(n-2) - 10000*a(n-4) for n>3.
G.f.: (1+111*x+1100*x^2-100*x^3) / ((1-x)*(1+x)*(1-100*x)*(1+100*x)).
(End)
a(n) = floor((11100 - (n mod 2))*100^n/9999). - Karl V. Keller, Jr., Sep 20 2021