A141147 Number of linear arrangements of n blue, n red and n green items such that the first item is blue and there are no adjacent items of the same color (first and last elements considered as adjacent).
2, 8, 44, 268, 1732, 11624, 80096, 562748, 4013396, 28964128, 211054120, 1550226880, 11463513440, 85257846080, 637243586944, 4783617720892, 36046416801268, 272543202174704, 2066898899119448, 15717398604230888
Offset: 1
Keywords
Links
- Max Alekseyev, PARI scripts for various problems
- L. Q. Eifler, K. B. Reid Jr., and D. P. Roselle, Sequences with adjacent elements unequal, Aequationes Mathematicae 6 (2-3), 1971.
Programs
-
Maple
A141147 := n -> 2^n*hypergeom([n, (1-n)/2, -n/2],[1, 1],1); seq(simplify(A141147(i)),i=1..20); # Peter Luschny, Jan 15 2012
-
PARI
{ a(n) = sum(k=0,n\2, binomial(n,2*k) * binomial(2*k,k) * binomial(n-1+k,k) * 2^(n-2*k) ) }
Formula
a(n) = Sum_{k=0..floor(n/2)} binomial(n,2k) * binomial(2k,k) * binomial(n-1+k,k) * 2^(n-2k).
a(n) = 2^n*Hypergeometric([n,(1-n)/2,-n/2],[1, 1],1). - Peter Luschny, Jan 15 2012
Recurrence: (3*n^3 + 13*n^2 + 16*n + 4)*a(n+2) = (21*n^3 + 73*n^2 + 74*n + 16)*a(n+1) + (24*n^3 + 32*n^2)*a(n). - Ralf Stephan, Feb 11 2014
a(n) = (1/n) * Sum_{k = floor(n/2)..n} k * binomial(n,k)^2 * binomial(2*k,n). - Peter Bala, Mar 19 2023