login
A056490
Number of periodic palindromes using exactly four different symbols.
5
0, 0, 0, 0, 0, 12, 24, 132, 240, 900, 1560, 4980, 8400, 24612, 40824, 113652, 186480, 502500, 818520, 2158260, 3498000, 9087012, 14676024, 37728372, 60780720, 155091300, 249401880, 632972340, 1016542800, 2569858212, 4123173624, 10393634292, 16664094960
OFFSET
1,6
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]
FORMULA
a(n) = 2*A056344(n) - A056284(n).
G.f.: 12*x^6*(1+x)/((1-x)*(1-2*x)*(1+2*x)*(1-2*x^2)*(1-3*x^2)). - Colin Barker, May 06 2012
a(n) = (k!/2)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)), with k=4 different colors used and where S2(n,k) is the Stirling subset number A008277. - Robert A. Russell, Jun 05 2018
EXAMPLE
For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.
For n=6, the 12 arrangements are ABACDC, ABADCD, ACABDB, ACADBD, ADABCB, ADACBC, ABCDCB, ABDCDB, ACBDBC, ACDBDC, ADBCBD, and ADCBCD.
MAPLE
a:=n->(factorial(4)/2)*(Stirling2(floor((n+1)/2), 4)+Stirling2(ceil((n+1)/2), 4)): seq(a(n), n=1..35); # Muniru A Asiru, Sep 26 2018
MATHEMATICA
k = 4; Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] +
StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 40}] (* Robert A. Russell, Jun 05 2018 *)
LinearRecurrence[{1, 9, -9, -26, 26, 24, -24}, {0, 0, 0, 0, 0, 12, 24}, 40] (* Robert A. Russell, Sep 29 2018 *)
PROG
(PARI) a(n) = my(k=4); (k!/2)*(stirling(floor((n+1)/2), k, 2) + stirling(ceil((n+1)/2), k, 2)); \\ Michel Marcus, Jun 05 2018
(GAP) a:=[0, 0, 0, 0, 0, 12, 24];; for n in [8..35] do a[n]:=a[n-1]+9*a[n-2]-9*a[n-3]-26*a[n-4]+26*a[n-5]+24*a[n-6]-24*a[n-7]; od; a; # Muniru A Asiru, Sep 26 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); [0, 0, 0, 0, 0] cat Coefficients(R!(12*x^6*(1+x)/((1-x)*(1-2*x)*(1+2*x)*(1-2*x^2)*(1-3*x^2)))); // G. C. Greubel, Oct 13 2018
CROSSREFS
Column 4 of A305540.
Sequence in context: A290304 A289335 A056500 * A130163 A002167 A154268
KEYWORD
nonn,easy
STATUS
approved