login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118171 Decimal representation of n-th iteration of the Rule 158 elementary cellular automaton starting with a single black cell. 5
1, 7, 29, 115, 477, 1843, 7645, 29491, 122333, 471859, 1957341, 7549747, 31317469, 120795955, 501079517, 1932735283, 8017272285, 30923764531, 128276356573, 494780232499, 2052421705181, 7916483719987, 32838747282909, 126663739519795, 525419956526557 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Eric Weisstein's World of Mathematics, Rule 158

Eric Weisstein's World of Mathematics, Elementary Cellular Automaton

Index entries for sequences related to cellular automata

Index entries for linear recurrences with constant coefficients, signature (0,17,0,-16).

FORMULA

a(n) = (1/30)*(-16+(-4)^n-10*(-1)^n+55*4^n).

From Colin Barker, Oct 08 2015: (Start)

a(n) = 17*a(n-2) - 16*a(n-4) for n>3.

G.f.: -(4*x^3-12*x^2-7*x-1) / ((x-1)*(x+1)*(4*x-1)*(4*x+1)).

(End)

a(n) = floor(28*4^n/15) for even n>=0; a(n) = floor(27*4^n/15) for odd n. - Karl V. Keller, Jr., Oct 09 2020

EXAMPLE

            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;

...

From Michael De Vlieger, Oct 08 2015: (Start)

First 8 rows, representing ON cells as "1", OFF cells within the bounds

of ON cells as "0", interpreted as a binary number at left, the decimal

equivalent appearing at right:

                   1 =      1

                 111 =      7

              1 1101 =     29

            111 0011 =    115

         1 1101 1101 =    477

       111 0011 0011 =   1843

    1 1101 1101 1101 =   7645

  111 0011 0011 0011 =  29491

11101 1101 1101 1101 = 122333

(End)

MATHEMATICA

Table[(-16 + (-4)^n - 10 (-1)^n + 55*4^n)/30, {n, 0, 24}] (* or *)

clip[lst_] := Block[{p = Flatten@ Position[lst, 1]}, Take[lst, {Min@ p, Max@ p}]]; FromDigits[#, 2] & /@ Map[clip, CellularAutomaton[158, {{1}, 0}, 24]] (* Michael De Vlieger, Oct 08 2015 *)

PROG

(PARI) Vec(-(4*x^3-12*x^2-7*x-1)/((x-1)*(x+1)*(4*x-1)*(4*x+1)) + O(x^30)) \\ Colin Barker, Oct 08 2015

(PARI) vector(100, n, n--; (1/30)*(-16+(-4)^n-10*(-1)^n+55*4^n)) \\ Altug Alkan, Oct 08 2015

(Python)

an_158 = []

for n in range(0, 40, 2):

    an_158.append(28*4**n//15)

    an_158.append(27*4**(n+1)//15)

print(an_158) # Karl V. Keller, Jr., Oct 03 2020

CROSSREFS

Cf. A071037 (cells), A265379 (binary).

Sequence in context: A124828 A296646 A037094 * A072261 A066744 A037576

Adjacent sequences:  A118168 A118169 A118170 * A118172 A118173 A118174

KEYWORD

nonn,base,easy

AUTHOR

Eric W. Weisstein, Apr 13 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 02:36 EDT 2021. Contains 343747 sequences. (Running on oeis4.)