OFFSET
0,2
COMMENTS
A string and its reverse are considered to be equivalent. Thus aabc and cbaa are considered to be identical, but abca is a different string.
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
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,6,-36).
FORMULA
a(n) = (6^n + 6^floor((n+1)/2))/2.
G.f.: (1-21*x^2) / ((1-6*x)*(1-6*x^2)). - R. J. Mathar, Jul 06 2011 [Adapted to offset 0 by Robert A. Russell, Nov 10 2018]
a(n) = 6*a(n-1) + 6*a(n-2) - 36*a(n-3) for n > 3. - Colin Barker, Mar 20 2017
a(n) = 6^(n + floor((n-1)/2)) * a(1-n) for all n in Z. - Michael Somos, Jul 10 2018
EXAMPLE
For a(2)=21, the six achiral strings are AA, BB, CC, DD, EE, and FF; the 15 (equivalent) chiral pairs are AB-BA, AC-CA, AD-DA, AE-EA, AF-FA, BC-CB, BD-DB, BE-EB, BF-FB, CD-DC, CE-EC, CF-FC, DE-ED, DF-FD, and EF-FE.
MATHEMATICA
k=6; Table[(k^n+k^Ceiling[n/2])/2, {n, 0, 30}] (* Robert A. Russell, Nov 25 2017 *)
a[ n_] := (6^n + 6^Quotient[n + 1, 2]) / 2; (* Michael Somos, Jul 10 2018 *)
LinearRecurrence[{6, 6, -36}, {1, 6, 21}, 31] (* Robert A. Russell, Nov 10 2018 *)
PROG
(PARI) Vec((1-21*x^2) / ((1 - 6*x)*(1 - 6*x^2)) + O(x^30)) \\ Colin Barker, Mar 20 2017 [Adapted to offset 0 by Robert A. Russell, Nov 10 2018]
(PARI) {a(n) = (6^n + 6^((n+1)\2)) / 2}; \\ Michael Somos, Jul 10 2018
(Magma) I:=[1, 6, 21]; [n le 3 select I[n] else 6*Self(n-1) +6*Self(n-2) - 36*Self(n-3): n in [1..30]]; // G. C. Greubel, Nov 10 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(0)=1 prepended by Robert A. Russell, Nov 10 2018
STATUS
approved