%I #18 Mar 23 2017 14:42:10
%S 1,1,2,6,6,2,2,12,30,38,24,6,2,18,74,174,248,212,100,20,2,24,138,480,
%T 1092,1668,1700,1110,420,70,2,30,222,1026,3228,7188,11492,13140,10500,
%U 5572,1764,252,2,36,326,1882,7580,22274,48852,80672,100044,91840,60564,27132,7392,924,2,42,450,3118,15324,56040,156664,339720,574716,757148,769356,591444,332640,129096,30888,3432,2,48,594,4804,27888,122136,415576,1118268,2403588,4143116,5719788,6281856,5416488,3586968,1760616,603174,128700,12870
%N T(n,k) = number of linear arrays of n 1's, n -1's, and k 0's such that no two adjacent elements are equal.
%F G.f.:((x+1)^2*sqrt((1-y)/(1-(2*x+1)^2*y))-x-1)/x.
%F T(n,0) G.f.: (1+y)/(1-y).
%F T(n,1) G.f.: (y^2 + 4*y + 1)/(1-y)^2.
%F T(n,2) G.f.: 2*y*(y^2 + 6*y + 3)/(1-y)^3.
%F T(n,3) G.f.: 2*y*(2*y^3 + 17*y^2 + 15*y + 1)/(1-y)^4.
%F T(n,4) G.f.: 4*y^2*(2*y^3 + 23*y^2 + 32*y + 6)/(1-y)^5.
%F T(n,5) G.f.: 2*y^2*(8*y^4 + 120*y^3 + 243*y^2 + 88*y + 3)/(1-y)^6.
%F T(n,2*n+1) = binomial(2*n,n).
%F T(n,2*n) = (n+2)*binomial(2*n,n).
%F T(n,n) = A110706(n) n > 0.
%F Sum_{2*n+k = m} T(n,k) = A199697(m).
%e The table starts with columns k=0...11 and rows n=0...5:
%e | 0 1 2 3 4 5 6 7 8 9 10 11
%e -----------------------------------------------------------
%e 0 | 1 1
%e 1 | 2 6 6 2
%e 2 | 2 12 30 38 24 6
%e 3 | 2 18 74 174 248 212 100 20
%e 4 | 2 24 138 480 1092 1668 1700 1110 420 70
%e 5 | 2 30 222 1026 3228 7188 11492 13140 10500 5572 1764 252
%e For n=2, k=4 the 24 arrays are:
%e [-1,0,-1,0,1,0,1,0] [-1,0,1,0,-1,0,1,0] [-1,0,1,0,1,0,-1,0] [1,0,-1,0,-1,0,1,0]
%e [1,0,-1,0,1,0,-1,0] [1,0,1,0,-1,0,-1,0] [0,-1,1,0,-1,0,1,0] [0,-1,1,0,1,0,-1,0]
%e [0,-1,0,-1,1,0,1,0] [0,-1,0,-1,0,1,0,1] [0,-1,0,1,-1,0,1,0] [0,-1,0,1,0,-1,1,0]
%e [0,-1,0,1,0,-1,0,1] [0,-1,0,1,0,1,-1,0] [0,-1,0,1,0,1,0,-1] [0,1,-1,0,-1,0,1,0]
%e [0,1,-1,0,1,0,-1,0] [0,1,0,-1,1,0,-1,0] [0,1,0,-1,0,-1,1,0] [0,1,0,-1,0,-1,0,1]
%e [0,1,0,-1,0,1,-1,0] [0,1,0,-1,0,1,0,-1] [0,1,0,1,-1,0,-1,0] [0,1,0,1,0,-1,0,-1]
%t nmax=8; Flatten[CoefficientList[Series[CoefficientList[Series[((x + 1)^2*Sqrt[(1 - y)/(1 - (2x + 1)^2*y)] - x - 1)/x, {y, 0, nmax}], y], {x, 0, 2nmax + 1}], x]] (* _Indranil Ghosh_, Mar 22 2017 *)
%Y Cf. A110706, A199697.
%K nonn,tabf
%O 0,3
%A _Stefan Hollos_, Mar 11 2017