cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A202736 Number of n X 2 0..1 arrays with row sums equal and column sums unequal to adjacent columns.

Original entry on oeis.org

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

Views

Author

R. H. Hardin, Dec 23 2011

Keywords

Comments

Column 2 of A202742.
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

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
		

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)