A222715 The number of binary pattern classes in the (2,n)-rectangular grid with 5 '1's and (2n-5) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other.
2, 14, 66, 198, 508, 1092, 2156, 3876, 6606, 10626, 16478, 24570, 35672, 50344, 69624, 94248, 125562, 164502, 212762, 271502, 342804, 428076, 529828, 649740, 790790, 954954, 1145718, 1365378, 1617968, 1906128, 2234480, 2606032, 3026034, 3497886, 4027506
Offset: 3
Links
- Vincenzo Librandi, Table of n, a(n) for n = 3..1000
- Index entries for linear recurrences with constant coefficients, signature (3,0,-8,6,6,-8,0,3,-1).
Crossrefs
Cf. A226048.
Programs
-
Magma
m:=30; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x^3*(1+4*x+12*x^2+8*x^3+7*x^4)/((1+x)^3*(1-x)^6))); -
Magma
[(1/4)*(Binomial(2*n,5) + 2*Binomial(n-1,2)*(1/2)*(1-(-1)^n)): n in [3..40]]; // Vincenzo Librandi, Sep 04 2013
-
Mathematica
Table[(n - 2) (n - 1) ((8 n^3 - 16 n^2 + 6 n - 15 (-1)^n + 15)/120), {n, 3, 40}] (* Bruno Berselli, May 30 2013 *) LinearRecurrence[{3, 0, -8, 6, 6, -8, 0, 3, -1}, {2, 14, 66, 198, 508, 1092, 2156, 3876, 6606}, 50] (* T. D. Noe, Jun 14 2013 *) CoefficientList[Series[2 (1 + 4 x + 12 x^2 + 8 x^3 + 7 x^4) / ((1 + x)^3 (1 - x)^6), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 04 2013 *)
-
R
a <- vector() for(n in 1:40) a[n] <- (1/4)*(choose(2*(n+2),5) + 2*choose(n+1,2)*(1/2)*(1-(-1)^n)) a [Yosu Yurramendi and María Merino, Aug 21 2013]
Formula
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6) -4*(2*n^2-22*n+63)*(-1)^n, with n>8, a(3)=2, a(4)=14, a(5)=66, a(6)=198, a(7)=508, a(8)=1092.
From Bruno Berselli, May 29 2013: (Start)
G.f.: 2*x^3*(1+4*x+12*x^2+8*x^3+7*x^4)/((1+x)^3*(1-x)^6).
a(n) = 3*a(n-1) -8*a(n-3) +6*a(n-4) +6*a(n-5) -8*a(n-6) +3*a(n-8) -a(n-9), with n>11.
a(n) = (n-2)*(n-1)*(8*n^3-16*n^2+6*n-15*(-1)^n+15)/120. (End)
a(n) = (1/4)*(binomial(2*n,5) + 2*binomial(n-1,2)*(1/2)*(1-(-1)^n)). [Yosu Yurramendi and María Merino, Aug 21 2013]