A202736 Number of n X 2 0..1 arrays with row sums equal and column sums unequal to adjacent columns.
2, 2, 8, 10, 32, 44, 128, 186, 512, 772, 2048, 3172, 8192, 12952, 32768, 52666, 131072, 213524, 524288, 863820, 2097152, 3488872, 8388608, 14073060, 33554432, 56708264, 134217728, 228318856, 536870912, 918624304, 2147483648, 3693886906, 8589934592, 14846262964
Offset: 1
Keywords
Examples
Some solutions for n=5 ..0..1....0..1....0..1....0..1....0..1....1..0....0..1....1..0....0..1....0..1 ..0..1....0..1....0..1....1..0....1..0....1..0....0..1....1..0....0..1....1..0 ..1..0....1..0....0..1....1..0....0..1....0..1....1..0....1..0....0..1....0..1 ..0..1....1..0....1..0....1..0....0..1....1..0....0..1....1..0....0..1....1..0 ..0..1....1..0....1..0....1..0....0..1....1..0....1..0....1..0....1..0....1..0
Links
- R. H. Hardin, Table of n, a(n) for n = 1..210
- Jiawang Nie, Pablo A. Parrilo, Bernd Sturmfels, Semidefinite Representation of the k-Ellipse, arXiv:math/0702005 [math.AG], 2007.
Crossrefs
Cf. A126869.
Programs
-
Magma
I:=[2,2,8]; [n le 3 select I[n] else ((-8*n+16)*Self(n-3)+(4*n-4)*Self(n-2)+(2*n-2)*Self(n-1))/n: n in [1..40]]; // Vincenzo Librandi, Sep 01 2015
-
Maple
seq(2^n - `if`(n::even, binomial(n,n/2), 0), n = 1 .. 30); # Robert Israel, Aug 31 2015
-
Mathematica
f[n_]:= If[EvenQ[n],2^n-Binomial[n,n/2],2^n];Drop[Table[f[n],{n,0,34}],1] (* Geoffrey Critzer, Dec 05 2013 *)
-
Sage
A202736 = lambda n: 2^n*(1-(((-1)^n+1)*gamma((n+1)/2))/(2*sqrt(pi)*gamma((n+2)/2))) [A202736(n) for n in (1..32)] # Peter Luschny, Sep 10 2014
Formula
For odd n, a(n) = 2^n, for even n, a(n) = 2^n - binomial(n,n/2). - Geoffrey Critzer, Dec 05 2013
a(n) = 2^n*(1-(((-1)^n+1)*Gamma((n+1)/2))/(2*sqrt(Pi)*Gamma((n+2)/2))). - Peter Luschny, Sep 10 2014
a(n) = 2^n - A126869(n). - Peter Luschny, Sep 10 2014
From Robert Israel, Aug 31 2015: (Start)
G.f.: 1/(1-2*x) - 1/sqrt(1-4*x^2).
E.g.f.: exp(2*x) - I_0(2*x) where I_0 is a modified Bessel function.
a(n) = ((-8*n+16)*a(n-3)+(4*n-4)*a(n-2)+(2*n-2)*a(n-1))/n. (End)
Comments