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.

Showing 1-1 of 1 results.

A283624 Number of {0,1} n X n matrices with no rows or columns in which all entries are the same.

Original entry on oeis.org

1, 0, 2, 102, 22874, 17633670, 46959933962, 451575174961302, 16271255119687320314, 2253375946574190518740230, 1219041140314101911449662059402, 2601922592659455476330065914740044182, 22040870572750372076278589658097827953983034
Offset: 0

Views

Author

Robert FERREOL, Mar 12 2017

Keywords

Comments

Every row and column must contain both a 0 and a 1 .
a(n) is the number of relations on n labeled points such that for every point x there exists y,z,t,u such that xRy, zRx, not(xRt), and not(uRx).

Examples

			For n=2 the a(2)=2 matrices are
  0 1
  1 0
and
  1 0
  0 1
		

Crossrefs

Cf. A048291.
Diagonal of A283654.

Programs

  • Maple
    seq(2*sum((-1)^(n+k)*binomial(n,k)*(2^k-1)^n,k=0..n)+2^(n^2)+2*(2^n-2)^n-4*(2^n-1)^n,n=0..10)
  • Mathematica
    Table[If[n==0, 1, 2 Sum[(-1)^(n + k) * Binomial[n, k] * (2^k - 1)^n, {k, 0,n}] + 2^(n^2) + 2*(2^n - 2)^n - 4*(2^n - 1)^n], {n, 0, 12}] (* Indranil Ghosh, Mar 12 2017 *)
  • PARI
    for(n=0, 12, print1(2*sum(k=0, n, (-1)^(n + k) * binomial(n, k) * (2^k - 1)^n) + 2^(n^2) + 2*(2^n - 2)^n - 4*(2^n - 1)^n,", ")) \\ Indranil Ghosh, Mar 12 2017
    
  • Python
    import math
    f = math.factorial
    def C(n, r): return f(n)//f(r)//f(n - r)
    def A(n):
        s=0
        for k in range(0, n+1):
            s+=(-1)**(n + k) * C(n, k) * (2**k -1)**n
        return 2*s + 2**(n**2) + 2*(2**n - 2)**n - 4*(2**n - 1)**n # Indranil Ghosh, Mar 12 2017

Formula

a(n) = 2*Sum_{k=0..n} ((-1)^(n+k)*binomial(n,k)*(2^k-1)^n) + 2^(n^2) + 2*(2^n-2)^n - 4*(2^n-1)^n.
a(n) = 2*A048291(n) + 2^(n^2) + 2*(2^n-2)^n - 4*(2^n-1)^n.

Extensions

a(11)-a(12) from Indranil Ghosh, Mar 12 2017
Showing 1-1 of 1 results.