OFFSET
0,2
COMMENTS
"BIK" (reversible, indistinct, unlabeled) transform of 3, 0, 0, 0, ...
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
C. G. Bower, Transforms (2)
Index entries for linear recurrences with constant coefficients, signature (3,3,-9).
FORMULA
a(n) = (1/2)*((2-(-1)^n)*3^floor(n/2) + 3^n). - Ralf Stephan, May 11 2004
For n>0, a(n) = 3 * A001444(n-1). - N. J. A. Sloane, Sep 22 2004
From Colin Barker, Apr 02 2012: (Start)
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3).
G.f.: (1-6x^2) / ((1-3x)*(1-3x^2)). (End) [Adapted to offset 0 by Robert A. Russell, Nov 10 2018]
a(n) = (1/2)*(3^(ceiling(n/2)) + 3^n). - Andrew Howroyd, Oct 10 2017
EXAMPLE
For a(2)=10, the four achiral strings are AA, BB, CC, and DD; the 6 (equivalent) chiral pairs are AB-BA, AC-CA, AD-DA, BC-CB, BD-DB, and CD-DC.
MATHEMATICA
f[n_] := If[EvenQ[n], (3^n + 3^(n/2))/2, (3^n + 3^Ceiling[n/2])/2];
Table[f[n], {n, 0, 25}] (* Geoffrey Critzer, Apr 24 2011 *)
CoefficientList[Series[(1-6x^2)/((1-3x) (1-3x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 22 2012 *) (* Adapted to offset 0 by Robert A. Russell, Nov 10 2018 *)
Table[(1/2) ((2 - (-1)^n) 3^Floor[n/2] + 3^n), {n, 0, 25}]. (* Bruno Berselli, Apr 22 2012 *)
LinearRecurrence[{3, 3, -9}, {1, 3, 6}, 31] (* Robert A. Russell, Nov 10 2018 *)
PROG
(Magma) I:=[1, 3, 6]; [n le 3 select I[n] else 3*Self(n-1)+3*Self(n-2)-9*Self(n-3): n in [1..25]]; // Vincenzo Librandi, Apr 22 2012
(PARI) a(n) = (3^n + 3^(ceil(n/2)))/2; \\ Andrew Howroyd, Oct 10 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(0)=1 prepended by Robert A. Russell, Nov 10 2018
STATUS
approved