

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.


6



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Also, the number of nonsymmetric compositions of n+1, e.g. 4 can be written 1+3, 3+1, 1+1+2, or 2+1+1 (but not 4, 2+2, 1+2+1 or 1+1+1+1).  Henry Bottomley, Jun 27 2005
If we examine the set of all binary words with infinite length we find that the average length of the shortest prefix which satisfies the above conditions is 4.
a(n) is also the number of minimum distinguishing (2)labelings of the path graph P_n for n > 1.  Eric W. Weisstein, Oct 16 2014
Also, the decimal representation of the diagonal from the origin to the corner of the nth stage of growth of the twodimensional cellular automaton defined by "Rule 62", based on the 5celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero.  Robert Price, Apr 22 2017


REFERENCES

S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.


LINKS

Table of n, a(n) for n=0..33.
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 5Neighbor Cellular Automata
Index to Elementary Cellular Automata
Index entries for linear recurrences with constant coefficients, signature (2,2,4).


FORMULA

G.f.: 2*x^2/( (1  2*x^2)*(12x) ).
a(n) = 2^n  2^ceiling(n/2).
a(n) = 2*A032085(n) = 2*A122746(n2) for n>=2.  Alois P. Heinz, Dec 09 2013


EXAMPLE

a(3) = 4 because we have: 000, 001, 110, 111.


MATHEMATICA

nn=30; CoefficientList[Series[2x^2/(12x^2)/(12x), {x, 0, nn}], x]
LinearRecurrence[{2, 2, 4}, {0, 0, 2}, 40] (* Harvey P. Dale, Sep 06 2015 *)


PROG

(PARI) a(n)=2^n2^ceil(n/2) \\ Charles R Greathouse IV, Dec 09 2013


CROSSREFS

Cf. A233533.
Sequence in context: A201078 A004645 A045687 * A057422 A036045 A331392
Adjacent sequences: A233408 A233409 A233410 * A233412 A233413 A233414


KEYWORD

nonn,easy


AUTHOR

Geoffrey Critzer, Dec 09 2013


EXTENSIONS

Misplaced comment added by Andrew Howroyd, Sep 30 2017


STATUS

approved



