%I #45 Sep 08 2022 08:45:18
%S 0,1,4,16,52,169,520,1600,4840,14641,44044,132496,397852,1194649,
%T 3585040,10758400,32278480,96845281,290545684,871666576,2615029252,
%U 7845176329,23535617560,70607118400,211821620920,635465659921
%N a(n) = (1 + 3^n - 2*3^(n/2))/4 if n is even, (1 + 3^n - 4*3^((n-1)/2))/4 if n odd.
%C a(n-1) is the number of chiral pairs of color patterns (set partitions) for a row of length n using up to 3 colors (subsets). For n=4, a(n-1)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB. - _Robert A. Russell_, Oct 28 2018
%D Balaban, A. T., Brunvoll, J., Cyvin, B. N., & Cyvin, S. J. (1988). Enumeration of branched catacondensed benzenoid hydrocarbons and their numbers of Kekulé structures. Tetrahedron, 44(1), 221-228. See Eq. 5.
%H Vincenzo Librandi, <a href="/A107767/b107767.txt">Table of n, a(n) for n = 1..1000</a>
%H Gy. Tasi and F. Mizukami, <a href="http://dx.doi.org/10.1023/A:1019163812482">Quantum algebraic-combinatoric study of the conformational properties of n-alkanes</a>, J. Math. Chemistry, 25, 1999, 55-64 (see p. 60).
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,0,-12,9).
%F G.f.: -x^2 / ( (x-1)*(3*x-1)*(3*x^2-1) ). - _R. J. Mathar_, Dec 16 2010
%F a(n) = 4*a(n-1) - 12*a(n-3) + 9*a(n-4). - _Vincenzo Librandi_, Jun 26 2012
%F From _Robert A. Russell_, Oct 28 2018: (Start)
%F a(n-1) = Sum_{j=0..k} (S2(n,j) - Ach(n,j)) / 2, where k=3 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
%F a(n-1) = (A124302(n) - A182522(n))/2.
%F a(n-1) = A124302(n) - A001998(n-1).
%F a(n-1) = A001998(n-1) - A182522(n).
%F a(n-1) = A122746(n-2) + A320526(n). (End)
%F E.g.f.: (1/12)*exp(-sqrt(3)*x)*(-3 + 2*sqrt(3) - (3 + 2*sqrt(3))*exp(2*sqrt(3)*x) + 3*exp((3 + sqrt(3))*x) + 3*exp(x + sqrt(3)*x)). - _Stefano Spezia_, Oct 29 2018
%F From _Bruno Berselli_, Oct 31 2018: (Start)
%F a(n) = (1 + 3^n - 3^((n-1)/2)*(4 + (-2 + sqrt(3))*(1 + (-1)^n)))/4. Therefore:
%F a(2*k) = (3^k - 1)^2/4;
%F a(2*k+1) = (3^k - 1)*(3^(k+1) - 1)/4. (End)
%p a:=proc(n) if n mod 2 = 0 then (1+3^n-2*3^(n/2))/4 else (1+3^n-4*3^((n-1)/2))/4 fi end: seq(a(n),n=1..32);
%t CoefficientList[Series[-x/((x-1)*(3*x-1)*(3*x^2-1)),{x,0,40}],x] (* or *) LinearRecurrence[{4,0,-12,9},{0,1,4,16},50] (* _Vincenzo Librandi_, Jun 26 2012 *)
%t Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
%t k=3; Table[Sum[StirlingS2[n,j]-Ach[n,j],{j,k}]/2,{n,2,40}] (* _Robert A. Russell_, Oct 28 2018 *)
%t CoefficientList[Series[(1/12 E^(-Sqrt[3] x) (-3 + 2 Sqrt[3] - (3 + 2 Sqrt[3]) E^(2 Sqrt[3] x) + 3 E^((3 + Sqrt[3]) x) + 3 E^(x + Sqrt[3] x)))/x, {x, 0, 20}], x]*Table[(k+1)!, {k, 0, 20}] (* _Stefano Spezia_, Oct 29 2018 *)
%o (Magma) I:=[0, 1, 4, 16]; [n le 4 select I[n] else 4*Self(n-1)-12*Self(n-3)+9*Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, Jun 26 2012
%o (PARI) x='x+O('x^50); concat(0, Vec(x^2/((1-x)*(3*x-1)*(3*x^2-1)))) \\ _Altug Alkan_, Sep 23 2018
%o (GAP) a:=[];; for n in [1..30] do if n mod 2 <> 0 then Add(a,(1+3^n-4*3^((n-1)/2))/4); else Add(a,(1+3^n-2*3^(n/2))/4); fi; od; a; # _Muniru A Asiru_, Oct 30 2018
%Y Cf. A167993 (first differences).
%Y Column 3 of A320751, offset by 1.
%Y Cf. A124302 (oriented), A001998 (unoriented), A182522 (achiral), varying offsets.
%K nonn,easy
%O 1,3
%A _Emeric Deutsch_, Jun 12 2005
%E Entry revised by _N. J. A. Sloane_, Jul 29 2011