OFFSET
1,3
COMMENTS
A string and its reverse are considered to be equivalent.
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
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-6,4).
FORMULA
a(n) = A005418(n+1) - 2.
G.f.: x^2*(1 + x - 4*x^2)/(1 - 3*x + 6*x^3 - 4*x^4). - Colin Barker, Feb 03 2012
a(1)=0, a(2)=1, a(3)=4, a(4)=8, a(n) = 3*a(n-1) - 6*a(n-3) + 4*a(n-4). - Harvey P. Dale, Feb 18 2012
From Colin Barker, Nov 24 2017: (Start)
a(n) = 2^(n/2-1) + 2^(n-1) - 2 for n even.
a(n) = 2^((n-1)/2) + 2^(n-1) - 2 for n odd. (End)
a(n) = k! (S2(n,k) + S2(ceiling(n/2),k)) / 2, where k=2 is the number of colors and S2 is the Stirling subset number. - Robert A. Russell, Sep 25 2018
EXAMPLE
For n=3, the four rows are ABA, BAB, AAB, and ABB, the last two being respectively equivalent to BAA and BBA, with which they form chiral pairs. - Robert A. Russell, Sep 25 2018
MAPLE
seq(2^(n-1) + 2^floor((n-1)/2) - 2, n=1..34); # Peter Luschny, Nov 25 2017
MATHEMATICA
Rest[CoefficientList[Series[x^2(1+x-4x^2)/(1-3x+6x^3-4x^4), {x, 0, 30}], x]] (* or *) LinearRecurrence[{3, 0, -6, 4}, {0, 1, 4, 8}, 30] (* Harvey P. Dale, Feb 18 2012 *)
PROG
(PARI) Vec(x^2*(1+x-4*x^2)/(1-3*x+6*x^3-4*x^4) + O(x^40)) \\ Colin Barker, Nov 24 2017
(PARI) a(n) = 2^(n-1)+2^((n-1)\2)-2; \\ Altug Alkan, Sep 25 2018
(Magma) [2^(n-1)+2^((n-1) div 2)-2: n in [1..40]]; // Vincenzo Librandi, Sep 29 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved