A095121 Expansion of (1-x+2x^2)/((1-x)*(1-2x)).
1, 2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590
Offset: 0
References
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
- Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
- S. Wolfram, A New Kind of Science
- Wolfram Research, Wolfram Atlas of Simple Programs
- Index entries for sequences related to cellular automata
- Index to 2D 5-Neighbor Cellular Automata
- Index to Elementary Cellular Automata
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
Crossrefs
Programs
-
Magma
[-2+4*2^(n-1)+(Binomial(2*n,n) mod 2): n in [0..40]]; // Vincenzo Librandi, Aug 14 2015
-
Maple
ZL := [S, {S=Prod(B,B), B=Set(Z, 1 <= card)}, labeled]: seq(combstruct[ count](ZL, size=n), n=1..31); # Zerinvary Lajos, Mar 13 2007 for k from 1 to 31 do 2*(2^k-1); od;
-
Mathematica
Join[{1}, LinearRecurrence[{3, -2}, {2, 6}, 50]] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *) Join[{1},NestList[2#+2&,2,40]] (* Harvey P. Dale, Dec 25 2013 *)
-
PARI
Vec((1-x+2*x^2)/((1-x)*(1-2*x)) + O(x^40)) \\ Michel Marcus, Aug 14 2015
-
PARI
vector(100, n, n--; if(n==0, 1, 2*2^n-2)) \\ Altug Alkan, Nov 26 2015
Formula
G.f.: (1-x+2*x^2)/((1-x)*(1-2*x)).
a(n) = A000918(n+1), n >= 1.
a(n) = 2*2^n - 2 + 0^n; a(n) = 3*a(n-1) - 2*a(n-2).
a(0)=1, a(1)=2, a(n) = 2*a(n-1) + 2 for n>1. - Philippe Deléham, Sep 28 2006
a(n) = Sum_{k=0..n} 2^k*A123110(n,k). - Philippe Deléham, Feb 09 2007
a(n) = 5*a(n-2) - 4*a(n-4) for n>4 [Because x(n)=f*x(n-1)+g*x(n-2) => x(n)=(f^2+2*g)*x(n-2)-g^2*x(n-4), here with f=3 and g=-2]. - Hermann Stamm-Wilbrandt, Aug 13 2015
E.g.f.: 1 + 2*exp(x)*(exp(x) - 1). - Stefano Spezia, Feb 25 2022
Extensions
Edited by N. J. A. Sloane, Apr 25 2007
Comments