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-4 of 4 results.

A001499 Number of n X n matrices with exactly 2 1's in each row and column, other entries 0.

Original entry on oeis.org

1, 0, 1, 6, 90, 2040, 67950, 3110940, 187530840, 14398171200, 1371785398200, 158815387962000, 21959547410077200, 3574340599104475200, 676508133623135814000, 147320988741542099484000, 36574751938491748341360000, 10268902998771351157327104000
Offset: 0

Views

Author

Keywords

Comments

Or, number of labeled 2-regular relations of order n.
Also number of ways to arrange 2n rooks on an n X n chessboard, with no more than 2 rooks in each row and column (no 3 in a line). - Vaclav Kotesovec, Aug 03 2013

References

  • R. Bricard, L'Intermédiaire des Mathématiciens, 8 (1901), 312-313.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, Sect. 6.3 Multipermutations, pp. 235-236, P(n,2), bipermutations.
  • L. Erlebach and O. Ruehr, Problem 79-5, SIAM Review. Solution by D. E. Knuth. Reprinted in Problems in Applied Mathematics, ed. M. Klamkin, SIAM, 1990, p. 350.
  • Shanzhen Gao and Kenneth Matheis, Closed formulas and integer sequences arising from the enumeration of (0,1)-matrices with row sum two and some constant column sums. In Proceedings of the Forty-First Southeastern International Conference on Combinatorics, Graph Theory and Computing. Congr. Numer. 202 (2010), 45-53.
  • J. T. Lewis, Maximal L-free subsets of a squarefree array, Congressus Numerantium, 141 (1999), 151-155.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Cor. 5.5.11 (b).
  • M. L. Stein and P. R. Stein, Enumeration of Stochastic Matrices with Integer Elements. Report LA-4434, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Jun 1970.
  • J. H. van Lint and R. M. Wilson, A Course in Combinatorics (Cambridge University Press, Cambridge, 1992), pp. 152-153. [The second edition is said to be a better reference.]

Crossrefs

Cf. A000681, A053871, A123544 (connected relations), A000986 (symmetric matrices), A007107 (traceless matrices).
Cf. A001501. Column 2 of A008300. Row sums of A284989.

Programs

  • Haskell
    a001499 n = a001499_list !! n
    a001499_list = 1 : 0 : 1 : zipWith (*) (drop 2 a002411_list)
       (zipWith (+) (zipWith (*) [3, 5 ..] $ tail a001499_list)
                    (zipWith (*) (tail a000290_list) a001499_list))
    -- Reinhard Zumkeller, Jun 02 2013
  • Mathematica
    a[n_] := (n-1)*n!*Gamma[n-1/2]*Hypergeometric1F1[2-n, 3/2-n, -1/2]/Sqrt[Pi]; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Oct 06 2011, after first formula *)
  • PARI
    a(n)=if(n<2,n==0,(n^2-n)*(a(n-1)+(n-1)/2*a(n-2)))
    
  • PARI
    seq(n)={Vec(serlaplace(serlaplace(exp(-x/2 + O(x*x^n))/sqrt(1-x + O(x*x^n)))))}; \\ Andrew Howroyd, Sep 09 2018
    

Formula

a(n) = (n! (n-1) Gamma(n-1/2) / Gamma(1/2) ) * 1F1[2-n; 3/2-n; -1/2] [Erlebach and Ruehr]. This representation is exact, asymptotic and convergent.
D-finite with recurrence 2*a(n) -2*n*(n-1)*a(n-1) -n*(n-1)^2*a(n-2)=0.
a(n) ~ 2 sqrt(Pi) n^(2n + 1/2) e^(-2n - 1/2) [Knuth]
a(n) = (1/2)*n*(n-1)^2 * ( (2*n-3)*a(n-2) + (n-2)^2*a(n-3) ) (from Anand et al.)
Sum_{n >= 0} a(n)*x^n/(n!)^2 = exp(-x/2)/sqrt(1-x); a(n) = n(n-1)/2 [ 2 a(n-1) + (n-1) a(n-2) ] (Bricard)
b_n = a_n/n! satisfies b_n = (n-1)(b_{n-1} + b_{n-2}/2); e.g.f. for {b_n} and for derangements (A000166) are related by D(x) = B(x)^2.
Limit_(n->infinity) sqrt(n)*a(n)/(n!)^2 = A096411 [Kuczma]. - R. J. Mathar, Sep 21 2007
a(n) = 4^(-n) * n!^2 * Sum_{i=0..n} (-2)^i * (2*n - 2*i)! / (i!*(n-i)!^2). - Shanzhen Gao, Feb 15 2010

A007107 Number of labeled 2-regular digraphs with n nodes.

Original entry on oeis.org

1, 0, 0, 1, 9, 216, 7570, 357435, 22040361, 1721632024, 166261966956, 19459238879565, 2714812050902545, 445202898702992496, 84798391618743138414, 18567039007438379656471, 4631381194792101913679985, 1305719477625154539392776080, 413153055417968797025496881656
Offset: 0

Views

Author

Keywords

Comments

Or number of n X n matrices with exactly two 1's in each row and column which are not in the main diagonal, other entries 0 (cf. A001499). - Vladimir Shevelev, Mar 22 2010
Number of 2-factors of the n-crown graph. - Andrew Howroyd, Feb 28 2016

References

  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1982.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. column t=0 of A284989.
Cf. A007108 (log transform), A197458 (row and column sum <=2), A219889 (unlabeled), A001499 (loops allowed).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, ((n-1)*(n-2)/2)^2,
          (n-1)*(2*(n^3-2*n^2+n+1)*a(n-1)/(n-2)+((n^2-2*n+2)*
          (n+1)*a(n-2) +(2*n^2-6*n+1)*n*a(n-3)+(n-3)*(a(n-4)*
          (n^3-5*n^2+3)-(n-4)*(n-1)*(n+1)*a(n-5))))/(2*n))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 10 2017
  • Mathematica
    Table[Sum[Sum[Sum[(-1)^(k+j-s)*n!*(n-k)!*(2n-k-2j-s)!/(s!*(k-s)!*(n-k-j)!^2*j!*2^(2n-2k-j)),{j,0,n-k}],{s,0,k}],{k,0,n}],{n,0,20}] (* Vaclav Kotesovec, May 09 2014 after Shanzhen Gao *)
  • PARI
    a(n)=sum(k=0,n, sum(s=0,k, sum(j=0,n-k, (-1)^(k+j-s)*n!*(n-k)!*(2*n-k-2*j-s)!/(s!*(k-s)!*(n-k-j)!^2*j!*2^(2*n-2*k-j))))) \\ Charles R Greathouse IV, Feb 08 2017

Formula

a(n) = Sum_{k=0..n} Sum_{s=0..k} Sum_{j=0..n-k} (-1)^(k+j-s)*n!*(n-k)!*(2n-k-2j-s)!/(s!*(k-s)!*(n-k-j)!^2*j!*2^(2n-2k-j)). - Shanzhen Gao, Nov 05 2007
a(n) ~ 2*sqrt(Pi) * n^(2*n+1/2) / exp(2*n+5/2). - Vaclav Kotesovec, May 09 2014

A321711 Triangle T(n,k) read by rows: coefficients of polynomials P_n(t) defined in Formula section.

Original entry on oeis.org

1, 1, 0, 3, 0, 0, 11, 9, 0, 1, 53, 120, 60, 40, 9, 309, 1410, 1800, 1590, 885, 216, 2119, 16560, 39960, 55120, 52065, 29016, 7570, 16687, 202755, 801780, 1696555, 2433165, 2300403, 1326850, 357435, 148329, 2624496, 15606360, 48387024, 99650670, 141429456, 135382464, 79738800, 22040361, 1468457, 36080100, 304274880, 1323453180, 3760709526, 7493549868, 10570597800, 10199809980, 6103007505, 1721632024
Offset: 0

Views

Author

Gheorghe Coserea, Nov 27 2018

Keywords

Examples

			For n=3 we have s1 = z1 + z2 + z3, s2 = z1^2 + z2^2 + z3^2, s12 = z1*z2 + z1*z3 + z2*z3, f1 = z1^2 + z2^2 + z3^2 + t*z2*z3 + z1*(z2 + z3), f2 = z1^2 + z2^2 + z3^2 + t*z1*z3 + z2*(z1 + z3), f3 = z1^2 + z2^2 + z3^2 + t*z1*z2 + z3*(z1 + z2), [(z1*z2*z3)^2] f1*f2*f3 = 11 + 9*t + t^3, therefore P_3(t) = 11 + 9*t + t^3.
A(x;t) = 1 + x + 3*x^2 + (11 + 9*t + t^3)*x^3 + (53 + 120*t + 60*t^2 + 40*t^3 + 9*t^4)*x^4 + ...
Triangle starts:
n\k [0]    [1]     [2]     [3]      [4]      [5]      [6]      [7]
[0] 1;
[1] 1;     0;
[2] 3;     0;      0;
[3] 11,    9,      0,      1;
[4] 53,    120,    60,     40,      9;
[5] 309,   1410,   1800,   1590,    885,     216;
[6] 2119,  16560,  39960,  55120,   52065,   29016,   7570;
[7] 16687, 202755, 801780, 1696555, 2433165, 2300403, 1326850, 357435;
[8] ...
		

Crossrefs

Programs

  • PARI
    P(n, t='t) = {
      my(z=vector(n, k, eval(Str("z", k))),
         s1=sum(k=1, #z, z[k]), s2=sum(k=1, #z, z[k]^2), s12=(s1^2 - s2)/2,
         f=vector(n, k, s2 + t*(s12 - z[k]*(s1 - z[k])) + z[k]*(s1 - z[k])), g=1);
      for (i=1, n, g *= f[i]; for(j=1, n, g=substpol(g, z[j]^3, 0)));
      for (k=1, n, g=polcoef(g, 2, z[k]));
      g;
    };
    seq(N) = concat([[1], [1, 0], [3, 0, 0]], apply(n->Vecrev(P(n,'t)), [3..N]));
    concat(seq(9))

Formula

Let z1..zn be n variables and s1 = Sum_{k=1..n} zk, s2 = Sum_{k=1..n} zk^2, s12 = (s1^2 - s2)/2, fk = s2 + t*(s12 - zk*(s1 - zk)) + zk*(s1 - zk) for k=1..n; we define P_n(t) = [(z1..zn)^2] Product_{k=1..n} fk.
A000255(n) = T(n,0).
A007107(n) = T(n,n).
A000681(n) = Sum_{k=0..n} T(n,k).
A274308(n) = Sum_{k=0..n} T(n,k)*2^k.

A364068 Triangle T(n,k) read by rows: Number of traceless binary n X n matrices with all row and column sums equal to k, 1<=k<=n.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 9, 9, 1, 0, 44, 216, 44, 1, 0, 265, 7570, 7570, 265, 1, 0, 1854, 357435, 1975560, 357435, 1854, 1, 0, 14833, 22040361, 749649145, 749649145, 22040361, 14833, 1, 0, 133496, 1721632024
Offset: 1

Views

Author

R. J. Mathar, Jul 04 2023

Keywords

Examples

			    0
    1        0
    2        1         0
    9        9         1      0
   44      216        44      1    0
  265     7570      7570    265    1 0
 1854   357435   1975560 357435 1854 1 0
14833 22040361 749649145
		

Crossrefs

Cf. A000166 (k=1), A007107 (k=2), A284989 (see 1st col), A284990 (see 1st col, k=3), A007105 (k=3?), A284991 (see 1st col, k=4), A008300 (any trace)

Formula

T(n,n)=0. (k=n would require a 1 on the diagonal)
T(n,n-1)=1. (1 at all entries but the diagonal)
T(n,n-k) = T(n,k-1). (Flip entries 0<->1 and erase diagonal) - R. J. Mathar, Jul 26 2023
Showing 1-4 of 4 results.