OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
A. J. Macfarlane, Generating functions for integer sequences defined by the evolution of cellular automata..., Fig. 10.
Eric Weisstein's World of Mathematics, Rule 94
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
Index entries for linear recurrences with constant coefficients, signature (0,17,0,-16).
FORMULA
a(0)=1, a(1)=7, a(n odd) = (10+11*4^n)/6, a(n even) = (1+5*4^n)/3.
From Colin Barker, Oct 08 2015 and Apr 16 2019: (Start)
a(n) = (12-(-4)^n-8*(-1)^n+21*4^n)/12 for n>1.
a(n) = 17*a(n-2) - 16*a(n-4) for n>5.
G.f.: -(2*x+1)*(16*x^4-5*x-1) / ((x-1)*(x+1)*(4*x-1)*(4*x+1)).
(End)
EXAMPLE
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 1011 = 27
111 0111 = 119
1 1010 1011 = 427
111 0101 0111 = 1 879
1 1010 1010 1011 = 6 827
111 0101 0101 0111 = 30 039
1 1010 1010 1010 1011 = 109 227
(End)
MATHEMATICA
clip[lst_] := Block[{p = Flatten@ Position[lst, 1]}, Take[lst, {Min@ p, Max@ p}]]; FromDigits[#, 2] & /@ Map[clip, CellularAutomaton[94, {{1}, 0}, 24]] (* Michael De Vlieger, Oct 08 2015 *)
PROG
(Python) print([(11*4**n + 10)//6 - 2*0**abs(n-1) if n%2 else (5*4**n + 1)//3 - 0**n for n in range(50)]) # Karl V. Keller, Jr., Sep 10 2021
CROSSREFS
KEYWORD
nonn,base,easy,changed
AUTHOR
Eric W. Weisstein, Apr 12 2006
STATUS
approved