|
|
A202736
|
|
Number of n X 2 0..1 arrays with row sums equal and column sums unequal to adjacent columns.
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is the number of binary words of length n such that the number of 0's is not equal to the number of 1's. - Geoffrey Critzer, Dec 05 2013
Also the degree of the irreducible polynomial that defines the multifocal ellipsoid with n foci, see links. - Moritz Firsching, Aug 31 2015
|
|
LINKS
|
|
|
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
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)
|
|
EXAMPLE
|
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
|
|
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, 32}], 1] (* Geoffrey Critzer, Dec 05 2013 *).
|
|
PROG
|
(Sage)
A202736 = lambda n: 2^n*(1-(((-1)^n+1)*gamma((n+1)/2))/(2*sqrt(pi)*gamma((n+2)/2)))
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|