

A056453


Number of palindromes of length n using exactly two different symbols.


15



0, 0, 2, 2, 6, 6, 14, 14, 30, 30, 62, 62, 126, 126, 254, 254, 510, 510, 1022, 1022, 2046, 2046, 4094, 4094, 8190, 8190, 16382, 16382, 32766, 32766, 65534, 65534, 131070, 131070, 262142, 262142, 524286, 524286, 1048574, 1048574, 2097150, 2097150, 4194302
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

Also the number of bitstrings of length n+2 where the last two runs have the same length. (A run is a maximal subsequence of (possibly just one) identical bits.)  David Nacin, Mar 03 2012
Also, the decimal representation of the diagonal from the corner to the origin 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

M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Aruna Gabhe, Problem 11623, Am. Math. Monthly 119 (2012) 161.
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 5Neighbor Cellular Automata
Index to Elementary Cellular Automata
Index entries for linear recurrences with constant coefficients, signature (1,2,2).


FORMULA

a(n) = 2^floor((n+1)/2)  2.
a(n) = a(n1) + 2*a(n2)  2*a(n3).  David Nacin, Mar 03 2012
G.f.: 2*x^3/((1x)*(12*x^2)).  David Nacin, Mar 03 2012
G.f.: k!(x^(2k1)+x^(2k))/Product_{i=1..k}(1ix^2), where k=2 is the number of symbols.  Robert A. Russell, Sep 25 2018
a(n) = k! S2(ceiling(n/2),k), where k=2 is the number of symbols and S2 is the Stirling subset number.  Robert A. Russell, Sep 25 2018


EXAMPLE

The palindromes in two symbols of length three take the forms 000, 111, 010, 101. Of these only two have exactly two symbols. Thus a(3) = 2.  David Nacin, Mar 03 2012


MATHEMATICA

Table[2^(Floor[n/2] + 1)  2, {n, 0, 40}] (* David Nacin, Mar 03 2012 *)
LinearRecurrence[{1, 2, 2}, {0, 0, 2}, 40] (* David Nacin, Mar 03 2012 *)
k=2; Table[k! StirlingS2[Ceiling[n/2], k], {n, 1, 30}] (* Robert A. Russell, Sep 25 2018 *)


PROG

(MAGMA) [2^Floor((n+1)/2)2: n in [1..40]]; // Vincenzo Librandi, Aug 16 2011
(PARI) a(n) = 2^((n+1)\2)2; \\ Altug Alkan, Sep 25 2018


CROSSREFS

Cf. A016116, A000918, A208900, A208901, A208902, A208903.
Sequence in context: A288302 A286409 A285610 * A244486 A309800 A306007
Adjacent sequences: A056450 A056451 A056452 * A056454 A056455 A056456


KEYWORD

nonn,easy


AUTHOR

Marks R. Nester


EXTENSIONS

More terms from Vincenzo Librandi, Aug 16 2011
Name clarified by Michel Marcus and Felix FrÃ¶hlich, Jul 09 2018


STATUS

approved



