A233411 The number of length n binary words with some prefix which contains two more 1's than 0's or two more 0's than 1's.
0, 0, 2, 4, 12, 24, 56, 112, 240, 480, 992, 1984, 4032, 8064, 16256, 32512, 65280, 130560, 261632, 523264, 1047552, 2095104, 4192256, 8384512, 16773120, 33546240, 67100672, 134201344, 268419072, 536838144, 1073709056, 2147418112, 4294901760, 8589803520
Offset: 0
Examples
a(3) = 4 because we have: 000, 001, 110, 111.
References
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
Links
- 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
- Eric Weisstein's World of Mathematics, Distinguishing Number
- 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 (2,2,-4).
Crossrefs
Cf. A233533.
Programs
-
Mathematica
nn=30;CoefficientList[Series[2x^2/(1-2x^2)/(1-2x),{x,0,nn}],x] LinearRecurrence[{2,2,-4},{0,0,2},40] (* Harvey P. Dale, Sep 06 2015 *)
-
PARI
a(n)=2^n-2^ceil(n/2) \\ Charles R Greathouse IV, Dec 09 2013
Formula
G.f.: 2*x^2/( (1 - 2*x^2)*(1-2x) ).
a(n) = 2^n - 2^ceiling(n/2).
Extensions
Misplaced comment added by Andrew Howroyd, Sep 30 2017
Comments