A056454 Number of palindromes of length n using exactly three different symbols.
0, 0, 0, 0, 6, 6, 36, 36, 150, 150, 540, 540, 1806, 1806, 5796, 5796, 18150, 18150, 55980, 55980, 171006, 171006, 519156, 519156, 1569750, 1569750, 4733820, 4733820, 14250606, 14250606, 42850116, 42850116, 128746950, 128746950, 386634060, 386634060, 1160688606
Offset: 1
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.]
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,5,-5,-6,6).
Programs
-
Magma
[StirlingSecond((n+1) div 2, 3)*Factorial(3): n in [1..40]]; // Vincenzo Librandi, Sep 26 2018
-
Maple
A056454:= n-> 3!*Stirling2(floor((n+1)/2),3); # (C. Ronaldo)
-
Mathematica
LinearRecurrence[{1,5,-5,-6,6},{0,0,0,0,6},40] (* Harvey P. Dale, Sep 02 2016 *) k=3; Table[k! StirlingS2[Ceiling[n/2],k],{n,1,30}] (* Robert A. Russell, Sep 25 2018 *)
-
PARI
a(n) = 3!*stirling((n+1)\2, 3, 2); \\ Altug Alkan, Sep 25 2018
Formula
a(n) = 3! * Stirling2( [(n+1)/2], 3).
G.f.: 6*x^5/((1-x)*(1-2*x^2)*(1-3*x^2)). - Colin Barker, May 05 2012
G.f.: k!(x^(2k-1)+x^(2k))/Product_{i=1..k}(1-i*x^2), where k=3 is the number of symbols. - Robert A. Russell, Sep 25 2018