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]
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..700
Index entries for linear recurrences with constant coefficients, signature (1,9,-9,-26,26,24,-24).
FORMULA
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
KEYWORD
nonn,easy
AUTHOR
STATUS
approved