cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A056453 #56 Feb 16 2025 08:32:43
%S A056453 0,0,2,2,6,6,14,14,30,30,62,62,126,126,254,254,510,510,1022,1022,2046,
%T A056453 2046,4094,4094,8190,8190,16382,16382,32766,32766,65534,65534,131070,
%U A056453 131070,262142,262142,524286,524286,1048574,1048574,2097150,2097150,4194302
%N A056453 Number of palindromes of length n using exactly two different symbols.
%C A056453 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
%C A056453 Also, the decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 62", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - _Robert Price_, Apr 22 2017
%D A056453 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]
%D A056453 S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
%H A056453 Vincenzo Librandi, <a href="/A056453/b056453.txt">Table of n, a(n) for n = 1..2000</a>
%H A056453 Aruna Gabhe, <a href="https://www.jstor.org/stable/10.4169/amer.math.monthly.119.02.161">Problem 11623</a>, Am. Math. Monthly 119 (2012) 161.
%H A056453 N. J. A. Sloane, <a href="http://arxiv.org/abs/1503.01168">On the Number of ON Cells in Cellular Automata</a>, arXiv:1503.01168 [math.CO], 2015
%H A056453 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a>
%H A056453 S. Wolfram, <a href="http://wolframscience.com/">A New Kind of Science</a>
%H A056453 Wolfram Research, <a href="http://atlas.wolfram.com/">Wolfram Atlas of Simple Programs</a>
%H A056453 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%H A056453 <a href="https://oeis.org/wiki/Index_to_2D_5-Neighbor_Cellular_Automata">Index to 2D 5-Neighbor Cellular Automata</a>
%H A056453 <a href="https://oeis.org/wiki/Index_to_Elementary_Cellular_Automata">Index to Elementary Cellular Automata</a>
%H A056453 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2).
%F A056453 a(n) = 2^floor((n+1)/2) - 2.
%F A056453 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3). - _David Nacin_, Mar 03 2012
%F A056453 G.f.: 2*x^3/((1-x)*(1-2*x^2)). - _David Nacin_, Mar 03 2012
%F A056453 G.f.: k!(x^(2k-1)+x^(2k))/Product_{i=1..k}(1-ix^2), where k=2 is the number of symbols. - _Robert A. Russell_, Sep 25 2018
%F A056453 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
%F A056453 E.g.f.: 1 - 2*cosh(x) + cosh(sqrt(2)*x) - 2*sinh(x) + sqrt(2)*sinh(sqrt(2)*x). - _Stefano Spezia_, Jun 06 2023
%e A056453 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
%t A056453 Table[2^(Floor[n/2] + 1) - 2, {n, 0, 40}] (* _David Nacin_, Mar 03 2012 *)
%t A056453 LinearRecurrence[{1, 2, -2}, {0, 0, 2}, 40] (* _David Nacin_, Mar 03 2012 *)
%t A056453 k=2; Table[k! StirlingS2[Ceiling[n/2],k],{n,1,30}] (* _Robert A. Russell_, Sep 25 2018 *)
%o A056453 (Magma) [2^Floor((n+1)/2)-2: n in [1..40]]; // _Vincenzo Librandi_, Aug 16 2011
%o A056453 (PARI) a(n) = 2^((n+1)\2)-2; \\ _Altug Alkan_, Sep 25 2018
%o A056453 (Python)
%o A056453 def A056453(n): return (1<<(n+1>>1))-2 # _Chai Wah Wu_, Feb 18 2024
%Y A056453 Cf. A000918, A016116, A056391, A208900, A208901, A208902, A208903.
%K A056453 nonn,easy
%O A056453 1,3
%A A056453 _Marks R. Nester_
%E A056453 More terms from _Vincenzo Librandi_, Aug 16 2011
%E A056453 Name clarified by _Michel Marcus_ and _Felix Fröhlich_, Jul 09 2018