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-10 of 19 results. Next

A002817 Doubly triangular numbers: a(n) = n*(n+1)*(n^2+n+2)/8.

Original entry on oeis.org

0, 1, 6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796, 32131, 38226, 45150, 52975, 61776, 71631, 82621, 94830, 108345, 123256, 139656, 157641, 177310, 198765, 222111, 247456, 274911, 304590
Offset: 0

Views

Author

Keywords

Comments

Number of inequivalent ways to color vertices of a square using <= n colors, allowing rotations and reflections. Group is dihedral group D_8 of order 8 with cycle index (1/8)*(x1^4 + 2*x4 + 3*x2^2 + 2*x1^2*x2); setting all x_i = n gives the formula a(n) = (1/8)*(n^4 + 2*n + 3*n^2 + 2*n^3).
Number of semi-magic 3 X 3 squares with a line sum of n-1. That is, 3 X 3 matrices of nonnegative integers such that row sums and column sums are all equal to n-1. - [Gupta, 1968, page 653; Bell, 1970, page 279]. - Peter Bertok (peter(AT)bertok.com), Jan 12 2002. See A005045 for another version.
Also the coefficient h_2 of x^{n-3} in the shelling polynomial h(x)=h_0*x^n-1 + h_1*x^n-2 + h_2*x^n-3 + ... + h_n-1 for the independence complex of the cycle matroid of the complete graph K_n on n vertices (n>=2) - Woong Kook (andrewk(AT)math.uri.edu), Nov 01 2006
If X is an n-set and Y a fixed 3-subset of X then a(n-4) is equal to the number of 5-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Starting with offset 1 = binomial transform of [1, 5, 10, 9, 3, 0, 0, 0, ...]. - Gary W. Adamson, Aug 05 2009
Starting with "1" = row sums of triangle A178238. - Gary W. Adamson, May 23 2010
The equation n*(n+1)*(n^2 + n + 2)/8 may be arrived at by solving for x in the following equality: (n^2+n)/2 = (sqrt(8x+1)-1)/2. - William A. Tedeschi, Aug 18 2010
Partial sums of A006003. - Jeremy Gardiner, Jun 23 2013
Doubly triangular numbers are revealed in the sums of row sums of Floyd's triangle.
1, 1+5, 1+5+15, ...
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
- Tony Foster III, Nov 14 2015
From Jaroslav Krizek, Mar 04 2017: (Start)
For n>=1; a(n) = sum of the different sums of elements of all the nonempty subsets of the sets of numbers from 1 to n.
Example: for n = 6; nonempty subsets of the set of numbers from 1 to 3: {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}; sums of elements of these subsets: 1, 2, 3, 3, 4, 5, 6; different sums of elements of these subsets: 1, 2, 3, 4, 5, 6; a(3) = (1+2+3+4+5+6) = 21, ... (End)
a(n) is also the number of 4-cycles in the (n+4)-path complement graph. - Eric W. Weisstein, Apr 11 2018

Examples

			G.f. = x + 6*x^2 + 21*x^3 + 55*x^4 + 120*x^5 + 231*x^6 + 406*x^7 + 666*x^8 + ...
		

References

  • A. Björner, The homology and shellability of matroids and geometric lattices, in Matroid Applications (ed. N. White), Encyclopedia of Mathematics and Its Applications, 40, Cambridge Univ. Press 1992.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 124, #25, Q(3,r).
  • 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 I, p. 292.

Crossrefs

Cf. A006003 (first differences), A165211 (mod 2).
Multiple triangular: A000217, A064322, A066370.
Cf. A006528 (square colorings).
Cf. A236770 (see crossrefs).
Row n=3 of A257493 and row n=2 of A331436 and A343097.
Cf. A000332.
Cf. A000292 (3-cycle count of \bar P_{n+4}), A060446 (5-cycle count of \bar P_{n+3}), A302695 (6-cycle count of \bar P_{n+5}).

Programs

  • Maple
    A002817 := n->n*(n+1)*(n^2+n+2)/8;
  • Mathematica
    a[ n_] := n (n + 1) (n^2 + n + 2) / 8; (* Michael Somos, Jul 24 2002 *)
    LinearRecurrence[{5,-10,10,-5,1}, {0,1,6,21,55},40] (* Harvey P. Dale, Jul 18 2011 *)
    nn=50;Join[{0},With[{c=(n(n+1))/2},Flatten[Table[Take[Accumulate[Range[ (nn(nn+1))/2]], {c,c}],{n,nn}]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    {a(n) = n * (n+1) * (n^2 + n + 2) / 8}; /* Michael Somos, Jul 24 2002 */
    
  • PARI
    concat(0, Vec(x*(1+x+x^2)/(1-x)^5 + O(x^50))) \\ Altug Alkan, Nov 15 2015
    
  • Python
    def A002817(n): return (m:=n*(n+1))*(m+2)>>3 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = 3*binomial(n+2, 4) + binomial(n+1, 2).
G.f.: x*(1 + x + x^2)/(1-x)^5. - Simon Plouffe (in his 1992 dissertation); edited by N. J. A. Sloane, May 13 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 3. - Warut Roonguthai, Dec 13 1999
a(n) = 5a(n-1) - 10a(n-2) + 10a(n-3) - 5a(n-4) + a(n-5) = A000217(A000217(n)). - Ant King, Nov 18 2010
a(n) = Sum(Sum(1 + Sum(3*n))). - Xavier Acloque, Jan 21 2003
a(n) = A000332(n+1) + A000332(n+2) + A000332(n+3), with A000332(n) = binomial(n, 4). - Mitch Harris, Oct 17 2006 and Bruce J. Nicholson, Oct 22 2017
a(n) = Sum_{i=1..C(n,2)} i = C(C(n,2) + 1, 2) = A000217(A000217(n+1)). - Enrique Pérez Herrero, Jun 11 2012
Euler transform of length 3 sequence [6, 0, -1]. - Michael Somos, Nov 19 2015
E.g.f.: x*(8 + 16*x + 8*x^2 + x^3)*exp(x)/8. - Ilya Gutkovskiy, Apr 26 2016
Sum_{n>=1} 1/a(n) = 6 - 4*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = 1.25269064911978447... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A000217(n)*A000124(n)/2.
a(n) = ((n-1)^4 + 3*(n-1)^3 + 2*(n-1)^2 + 2*n))/8. - Bruce J. Nicholson, Apr 05 2017
a(n) = (A016754(n)+ A007204(n)- 2) / 32. - Bruce J. Nicholson, Apr 14 2017
a(n) = a(-1-n) for all n in Z. - Michael Somos, Apr 17 2017
a(n) = T(T(n)) where T are the triangular numbers A000217. - Albert Renshaw, Jan 05 2020
a(n) = 2*n^2 - n + 6*binomial(n, 3) + 3*binomial(n, 4). - Ryan Jean, Mar 20 2021
a(n) = (A008514(n) - 1)/16. - Charlie Marion, Dec 20 2024

Extensions

More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 29 1999

A002721 Number of 3 X 3 X 3 arrays M_ijk (1 <= i,j,k <= 3) with entries satisfying 0 <= M_ijk <= n and all line sums equal to n.

Original entry on oeis.org

1, 12, 132, 847, 3921, 14506, 45402, 124707, 308407, 699766, 1477686, 2936517, 5540107, 9993192, 17333536, 29048541, 47220357, 74703832, 115341952, 174223731, 257989821, 375191422, 536708382, 756232687, 1050823851, 1441543026, 1954172962
Offset: 0

Views

Author

Keywords

Comments

Number of 3 X 3 X 3 arrays M_ijk (1 <= i,j,k <= 3) satisfying Sum_i M_ijk = n (all j,k), Sum_j M_ijk = n (all i,k), Sum_k M_ijk = n (all i,j) and 0 <= M_ijk <= n.
The constraints imply that Sum_{i,j,k} M_ijk = 9n.
This is a "magic cube" in Stanley's notation (see Stanley references). - N. J. A. Sloane, Jul 07 2014

Examples

			Comment from _N. J. A. Sloane_, Jul 06 2014: (Start)
Here are four of the twelve arrays showing that a(1) = 12 (each row shows top face, middle face, bottom face):
 -----------
 100 010 001
 010 001 100
 001 100 010
 -----------
 100 001 010
 010 100 001
 001 010 100
 -----------
 001 010 100
 010 100 001
 100 001 010
 -----------
 001 100 010
 010 001 100
 100 010 001
 -----------
Each face must show one of the six 3 X 3 permutation matrices. There are 6 choices for the top face, and for each of these there are two choices for the second face and the third face is then determined, for a total of a(1)=6*2*1=12. (End)
		

References

  • 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, Wadsworth, Vol. 1, Second Edition, Section 4.6.1.

Crossrefs

See A001496 for the two-dimensional 4 X 4 analog. Cf. also A002817.

Programs

  • Magma
    [(1/4032)*n*(n+1)*(n*(n+1)*(n*(n+1)*(31*n*(n+1)+1004)+6820)+4272)+1 : n in [0..30] ]; // Wesley Ivan Hurt, Jul 01 2014
  • Maple
    A002721:=n->(1/4032)*n*(n+1)*(n*(n+1)*(n*(n+1)*(31*n*(n+1)+1004)+6820)+ 4272)+1: seq(A002721(n), n=0..30); # Wesley Ivan Hurt, Jul 01 2014
  • Mathematica
    CoefficientList[Series[-(x^8 + 3*x^7 + 60*x^6 + 7*x^5 + 168*x^4 + 7*x^3 + 60*x^2 + 3*x + 1)/(x - 1)^9, {x, 0, 30}], x] (* Wesley Ivan Hurt, Jul 01 2014 *)
  • PARI
    Vec(-(x^8+3*x^7+60*x^6+7*x^5+168*x^4+7*x^3+60*x^2+3*x+1)/(x-1)^9 + O(x^100)) \\ Colin Barker, Jul 01 2014
    

Formula

a(n) = (1/4032) * m * (m * (m * (31 * m + 1004) + 6820) + 4272) + 1, where m = n*(n+1) (from the Bell reference). - Sean A. Irvine, Jul 01 2014
G.f.: -(x^8+3*x^7+60*x^6+7*x^5+168*x^4+7*x^3+60*x^2+3*x+1) / (x-1)^9. - Colin Barker, Jul 01 2014

Extensions

More terms from Sean A. Irvine, Jul 01 2014
Edited by N. J. A. Sloane, Jul 06 2014

A257493 Number A(n,k) of n X n nonnegative integer matrices with all row and column sums equal to k; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 6, 1, 1, 1, 4, 21, 24, 1, 1, 1, 5, 55, 282, 120, 1, 1, 1, 6, 120, 2008, 6210, 720, 1, 1, 1, 7, 231, 10147, 153040, 202410, 5040, 1, 1, 1, 8, 406, 40176, 2224955, 20933840, 9135630, 40320, 1, 1, 1, 9, 666, 132724, 22069251, 1047649905, 4662857360, 545007960, 362880, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 26 2015

Keywords

Comments

Also the number of ordered factorizations of m^k into n factors, where m is a product of exactly n distinct primes and each factor is a product of k primes (counted with multiplicity). A(2,2) = 3: (2*3)^2 = 36 = 4*9 = 6*6 = 9*4.

Examples

			Square array A(n,k) begins:
  1,   1,      1,        1,          1,           1,            1, ...
  1,   1,      1,        1,          1,           1,            1, ...
  1,   2,      3,        4,          5,           6,            7, ...
  1,   6,     21,       55,        120,         231,          406, ...
  1,  24,    282,     2008,      10147,       40176,       132724, ...
  1, 120,   6210,   153040,    2224955,    22069251,    164176640, ...
  1, 720, 202410, 20933840, 1047649905, 30767936616, 602351808741, ...
		

Crossrefs

Rows n=0+1, 2-9 give: A000012, A000027(k+1), A002817(k+1), A001496, A003438, A003439, A008552, A160318, A160319.
Main diagonal gives A110058.
Cf. A257463 (unordered factorizations), A333733 (non-isomorphic matrices), A008300 (binary matrices).

Programs

  • Maple
    with(numtheory):
    b:= proc(n, k) option remember; `if`(n=1, 1, add(
          `if`(bigomega(d)=k, b(n/d, k), 0), d=divisors(n)))
        end:
    A:= (n, k)-> b(mul(ithprime(i), i=1..n)^k, k):
    seq(seq(A(n, d-n), n=0..d), d=0..8);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n==1, 1, Sum[If[PrimeOmega[d]==k, b[n/d, k], 0], {d, Divisors[n]}]]; A[n_, k_] := b[Product[Prime[i], {i, 1, n}]^k, k]; Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 20 2016, after Alois P. Heinz *)
  • PARI
    T(n, k)={
      local(M=Map(Mat([n, 1])));
      my(acc(p, v)=my(z); mapput(M, p, if(mapisdefined(M, p, &z), z+v, v)));
      my(recurse(h, p, q, v, e) = if(!p, if(!e, acc(q, v)), my(i=poldegree(p), t=pollead(p)); self()(k, p-t*x^i, q+t*x^i, v, e); for(m=1, h-i, for(j=1, min(t, e\m), self()(if(j==t, k, i+m-1), p-j*x^i, q+j*x^(i+m), binomial(t, j)*v, e-j*m)))));
      for(r=1, n, my(src=Mat(M)); M=Map(); for(i=1, matsize(src)[1], recurse(k, src[i, 1], 0, src[i, 2], k))); vecsum(Mat(M)[, 2])
    } \\ Andrew Howroyd, Apr 04 2020
  • Sage
    bigomega = sloane.A001222
    @cached_function
    def b(n, k):
        if n == 1:
            return 1
        return sum(b(n//d, k) if bigomega(d) == k else 0 for d in n.divisors())
    def A(n, k):
        return b(prod(nth_prime(i) for i in (1..n))^k, k)
    [A(n, d-n) for d in (0..10) for n in (0..d)] # Freddy Barrera, Dec 27 2018, translated from Maple
    
  • Sage
    from sage.combinat.integer_matrices import IntegerMatrices
    [IntegerMatrices([d-n]*n, [d-n]*n).cardinality() for d in (0..10) for n in (0..d)] # Freddy Barrera, Dec 27 2018
    

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

A001501 Number of n X n 0-1 matrices with all column and row sums equal to 3.

Original entry on oeis.org

1, 0, 0, 1, 24, 2040, 297200, 68938800, 24046189440, 12025780892160, 8302816499443200, 7673688777463632000, 9254768770160124288000, 14255616537578735986867200, 27537152449960680597739468800, 65662040698002721810659005184000
Offset: 0

Views

Author

Keywords

Comments

Also, for n >= 3, number of bicubical graphs on 2n labeled nodes of two colors [Read, 1958, 1971] - N. J. A. Sloane, Sep 08 2014
Also number of ways to arrange 3n rooks on an n X n chessboard, with no more than 3 rooks in each row and column (no 4 in a line). - Vaclav Kotesovec, Aug 03 2013

Examples

			G.f. = 1 + x^3 + 24*x^4 + 2040*x^5 + 297200*x^6 + 68938800*x^7 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 236, P(n,3).
  • R. C. Read, Some Enumeration Problems in Graph Theory. Ph.D. Dissertation, Department of Mathematics, Univ. London, 1958.
  • 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, Wadsworth, Vol. 1, 1986; see Example 1.1.3, page 2, f(n).
  • 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.

Crossrefs

Cf. A001499. Column 3 of A008300. Row sums of A284990.

Programs

  • Maple
    a:= n-> n!^2/6^n *add(add((-1)^b *2^a *3^b *(3*n-3*a-2*b)!/
            (a! *b! *(n-a-b)!^2 *6^(n-a-b)), b=0..n-a), a=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 20 2011
    # second Maple program:
    a:= proc(n) option remember; `if`(n<4, (n-1)*(n-2)/2,
          n*(n-1)*(9*(3*n^2-5*n+4)*a(n-1)+(3*n-6)*(3*n+1)*
          (n-1)*a(n-2)+(9*n^2-30*n+13)*(n-1)*(n-2)^2*a(n-3)
          -(3*n-2)*(n-1)*(n-2)^2*(n-3)^2*a(n-4))/(36*n-60))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 13 2017
  • Mathematica
    Table[6^(-n) Total[Map[(-1)^#[[2]] n!^2 (#[[2]] + 3 #[[3]])! 2^#[[1]] 3^#[[2]]/(#[[1]]! #[[2]]! #[[3]]!^2 6^#[[3]]) &, Compositions[n, 3]]], {n, 0, 20}] (* Geoffrey Critzer, Mar 19 2011 *)
    a[n_] := n!^2*Sum[2^(2k-n)*3^(k-n)*(3(n-k))!*HypergeometricPFQ[{k-n, k-n}, {3(k-n)/2, 1/2 + 3(k-n)/2}, -9/2]/(k! (n-k )!^2), {k, 0, n}]/6^n;
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jul 07 2018 *)
  • PARI
    {a(n) = local(k); if( n<0, 0, n!^2 * sum(j=0, n, sum(i=0, n-j, if(1, k=n-i-j; (j + 3*k)! / (3^i * 36^k * i! * k!^2))) / (j! * (-2)^j)))}; /* Michael Somos, May 28 2002 */

Formula

a(n) = n!^2/6^n * Sum_{a=0..n} Sum_{b=0..n-a} (-1)^b * 2^a * 3^b * (3*n-3*a-2*b)! / (a! * b! * (n-a-b)!^2 * 6^(n-a-b)). - Shanzhen Gao, Feb 19 2010
D-finite with recurrence: 12*(3*n-5)*a(n) = 9*n*(3*n^2-5*n+4)*(n-1)*a(n-1) + 3*(n-2)*n*(3*n+1)*(n-1)^2*a(n-2) + (n-2)^2*n*(9*n^2-30*n+13)*(n-1)^2*a(n-3) - (n-3)^2*(n-2)^2*n*(3*n-2)*(n-1)^2*a(n-4). - Vaclav Kotesovec, Aug 03 2013
a(n) ~ sqrt(6*Pi) * (3/4)^n * n^(3*n+1/2) / exp(3*n+2). - Vaclav Kotesovec, Aug 03 2013

Extensions

Additional comments from Michael Somos, May 28 2002

A000681 Number of n X n matrices with nonnegative entries and every row and column sum 2.

Original entry on oeis.org

1, 1, 3, 21, 282, 6210, 202410, 9135630, 545007960, 41514583320, 3930730108200, 452785322266200, 62347376347779600, 10112899541133589200, 1908371363842760216400, 414517594539154672566000, 102681435747106627787376000, 28772944645196614863048048000
Offset: 0

Views

Author

Keywords

Comments

Or, number of labeled 2-regular pseudodigraphs (multiple arcs and loops allowed) of order n.
Also, number of permutations of the multiset {1^2,2^2,...,n^2} with the descent set consisting of multiples of 2. - Max Alekseyev, Apr 28 2014

Examples

			G.f. = 1 + x + 3*x^2 + 21*x^3 + 282*x^4 + 6210*x^5 + 202410*x^6 + 9135630*x^7 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 125, #25, a_n.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, section 3.5.10.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1982.
  • 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 (a).
  • 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.
  • C. B. Tompkins, Methods of successive restrictions in computational problems involving discrete variables. 1963, Proc. Sympos. Appl. Math., Vol. XV pp. 95-106; Amer. Math. Soc., Providence, R.I.

Crossrefs

Column k=2 of A257493.
Row sums of A269742 and A307804.
Row and column sums equal s: A000142 (s=1), A001500 (s=3), A172806 (s=4), A172862 (s=5), A172894 (s=6), A172919 (s=7), A172944 (s=8), A172958 (s=9).

Programs

  • Maple
    A000681 := proc(n)
        coeftayl( exp(x/2)/sqrt(1-x),x=0,n) ;
        %*(n!)^2 ;
    end proc:
    seq(A000681(n),n=0..10) ; # R. J. Mathar, May 01 2019
  • Mathematica
    a[n_] := Sum[ ((2*i)!*n!^2) / (2^i*(i!^2*(n - i)!)), {i, 0, n}]/2^n; Table[ a[n], {n, 0, 17}] (* Jean-François Alcover, Dec 08 2011 *)
    a[n_] := n!*HypergeometricPFQ[{1/2, -n}, {}, -2]/2^n; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Aug 08 2012 *)
  • PARI
    Vec( serlaplace(serlaplace( exp(x/2)/sqrt(1-x) )) ) /* Max Alekseyev, Apr 28 2014 */
  • Sage
    from sage.combinat.integer_matrices import IntegerMatrices
    def a(n): return IntegerMatrices([2]*n, [2]*n).cardinality() # Ralf Stephan, Mar 02 2014
    

Formula

Sum_{n >= 0} a(n) x^n / n!^2 = exp(x/2) / sqrt(1-x).
D-finite with recurrence a(n) = n^2*a(n-1) - (1/2)*n*(n-1)^2*a(n-2).
a(n) is asymptotic to c/sqrt(n)*(n!)^2 where c=0.93019... - Benoit Cloitre, Jun 25 2004
a(n) = sum(i=0..n, 2^(i-2*n) * C(n, i)^2 * (2*n-2*i)! * i! ).
a(n) = 2^(-n) * sum(i=0..n, ((n!)^2*(2*i)!) / ((i!)^2*((n-i)!*2^i)) ). - Shanzhen Gao, Nov 05 2007
In Cloitre's formula is c = exp(1/2)/sqrt(Pi) = 0.9301913671026328586. - Vaclav Kotesovec, Aug 12 2013
With c as used above by Cloitre and Kotesovec, a(n) is asymptotic to c/sqrt(n)*(n!)^2 * (1 + 2/(16*n) + 50/(16*n)^2 + 1100/(16*n)^3 + 32438/(16*n)^4 + 1185660/(16*n)^5 + 50498228/(16*n)^6 + 2438464600/(16*n)^7 + 131323987366/(16*n)^8 + 7782036656108/(16*n)^9 + 501905392385436/(16*n)^10 + ...). - Jon E. Schoenfield, Mar 03 2014
E.g.f.: 2/((2-x)*W(0)), where W(k) = 1 - (2*k+1)*x/(2-x-2*(k+1)*x/W(k+1)); (continued fraction). - Sergei N. Gladkovskii, Nov 25 2014

Extensions

More terms from David W. Wilson

A001500 Number of stochastic matrices of integers: n X n arrays of nonnegative integers with all row and column sums equal to 3.

Original entry on oeis.org

1, 1, 4, 55, 2008, 153040, 20933840, 4662857360, 1579060246400, 772200774683520, 523853880779443200, 477360556805016931200, 569060910292172349004800, 868071731152923490921728000, 1663043727673392444887284377600, 3937477620391471128913917360384000
Offset: 0

Views

Author

Keywords

Comments

Also, number of bicubical multigraphs on 2n labeled nodes of two colors [Read, 1958, 1971]. - N. J. A. Sloane, Sep 09 2014

Examples

			a(2) = 4 with: [0 3]    [1 2]    [2 1]    [3 0]
               [3 0],   [2 1],   [1 2],   [0 3]. - _Bernard Schott_, Oct 15 2019
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 125, Problem 25(4), b_n (but beware errors).
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983.
  • R. C. Read, Some Enumeration Problems in Graph Theory. Ph.D. Dissertation, Department of Mathematics, Univ. London, 1958.
  • 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).
  • 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.

Crossrefs

Row sums of A269743 and of A344379.
Column k=3 of A257493.

Programs

  • Mathematica
    a[n_] := 6^(-n) Sum[2^j 3^k n!^2 (3n - 2k - 3j)!/(j! k! (n - j - k)!^2 * 6^(n - j - k)), {j, 0, n}, {k, 0, n - j}];
    a /@ Range[0, 15] (* Jean-François Alcover, Oct 15 2019, after Shanzhen Gao *)

Formula

From Vladeta Jovovic, Mar 26 2001: (Start)
E.g.f. y(x) = Sum_{n >= 0} a(n)*x^n/(n!)^2 satisfies differential equation 81*x^5*(x^4 - x^2 + x + 4)*(d^4/dx^4)y(x) + 324*x^4*(x^4 - x^2 + x + 4)*(d^3/dx^3)y(x) - 9*x*(x^10 - 4*x^9 + 22*x^8 - 8*x^7 - 22*x^6 + 8*x^5 + 106*x^4 + 234*x^3 + 48*x^2 - 320*x + 64)*(d^2/dx^2)y(x) - 9*(x^10 - 4*x^9 + 22*x^8 - 8*x^7 - 4*x^6 + 8*x^5 + 88*x^4 + 252*x^3 + 120*x^2 - 320*x + 64)*(d/dx)y(x) + (x^11 - 7*x^10 + 30*x^9 - 16*x^8 - 43*x^7 + 51*x^6 + 238*x^5 + 630*x^4 + 36*x^3 - 1944*x^2 - 1152*x + 576)*y(x) = 0.
Recurrence: a(n) = n!*v(n) where v(n) = 1/(576*n)*((-198*n^9 + 8712*n^8 - 165175*n^7 + 1764196*n^6 - 11643772*n^5 + 48965728*n^4 - 130257475*n^3 + 209370724*n^2 - 182126340*n + 64083600)*v(n - 8) + (36*n^10 - 1944*n^9 + 45884*n^8 - 621504*n^7 + 5330892*n^6 - 30123576*n^5 + 112954596*n^4 - 275612976*n^3 + 415021552*n^2 - 343920960*n + 116928000)*v(n - 9) + (-9*n^11 + 585*n^10 - 16800*n^9 + 280800*n^8 - 3027357*n^7 + 22034565*n^6 - 110039130*n^5 + 375129450*n^4 - 849926784*n^3 + 1208298600*n^2 - 958439520*n + 315705600)*v(n - 10) + (-7*n^10 + 385*n^9 - 9240*n^8 + 127050*n^7 - 1104411*n^6 + 6314385*n^5 - 23918510*n^4 + 58866500*n^3 - 89275032*n^2 + 74400480*n - 25401600)*v(n - 11) + (-81*n^7 + 1944*n^6 - 20232*n^5 + 115578*n^4 - 383283*n^3 + 724230*n^2 - 708372*n + 270216)*v(n - 4) + (-72*n^6 + 1440*n^5 - 10890*n^4 + 40500*n^3 - 78678*n^2 + 75780*n - 28080)*v(n - 5) + (81*n^9 - 3321*n^8 + 59004*n^7 - 594054*n^6 + 3718687*n^5 - 14927199*n^4 + 38152096*n^3 - 59311746*n^2 + 50236612*n - 17330160)*v(n - 6) + (72*n^8 - 2520*n^7 + 37347*n^6 - 304479*n^5 + 1484133*n^4 - 4394565*n^3 + 7642248*n^2 - 7039116*n + 2576880)*v(n - 7) + (n^11 - 66*n^10 + 1925*n^9 - 32670*n^8 + 357423*n^7 - 2637558*n^6 + 13339535*n^5 - 45995730*n^4 + 105258076*n^3 - 150917976*n^2 + 120543840*n - 39916800)*v(n - 12) + (2880*n^2 - 5760*n + 3456)*v(n - 1) + (324*n^5 - 3564*n^4 + 14148*n^3 - 26028*n^2 + 21312*n - 6192)*v(n - 2) + (81*n^6 - 1377*n^5 + 7209*n^4 - 13203*n^3 - 3402*n^2 + 32076*n - 21384)*v(n - 3)). (End)
a(n) = 6^(-n) * Sum_{ alpha = 0..n, beta = 0..n-alpha } (2^alpha*3^beta*(n!)^2*(-2*beta+3*n-3*alpha)!)/(alpha!*beta!*(n-alpha-beta)!^2*6^(n-alpha-beta)). - Shanzhen Gao, Nov 05 2007
a(n) ~ sqrt(Pi) * 3^(n + 1/2) * n^(3*n + 1/2) / (2^(2*n - 1/2) * exp(3*n - 2)). - Vaclav Kotesovec, Oct 15 2019

Extensions

More terms from Vladeta Jovovic, Mar 26 2001

A058390 Number of 4 X 4 matrices with nonnegative integer entries and all row sums equal to n, up to row and column permutation.

Original entry on oeis.org

1, 5, 53, 458, 3411, 19865, 95214, 383714, 1346183, 4202086, 11905966, 31061806, 75533056, 172800689, 374861365, 775978710, 1541027694, 2949003213, 5458806804, 9805626744, 17140511056
Offset: 0

Views

Author

Vladeta Jovovic, Nov 24 2000

Keywords

Crossrefs

Programs

A058528 Number of n X n (0,1) matrices with all column and row sums equal to 4.

Original entry on oeis.org

1, 0, 0, 0, 1, 120, 67950, 68938800, 116963796250, 315031400802720, 1289144584143523800, 7722015017013984456000, 65599839591251908982712750, 769237071909157579108571190000, 12163525741347497524178307740904300
Offset: 0

Views

Author

David desJardins, Dec 22 2000

Keywords

Comments

Further terms generated by a Mathematica program written by Gordon G. Cash, who thanks B. R. Perez-Salvador, Universidad Autonoma Metropolitana Unidad Iztapalapa, Mexico, for providing the algorithm on which this program was based.
Also number of ways to arrange 4n rooks on an n X n chessboard, with no more than 4 rooks in each row and column. - Vaclav Kotesovec, Aug 04 2013
Generally (Canfield + McKay, 2004), a(n) ~ exp(-1/2) * binomial(n,s)^(2*n) / binomial(n^2,s*n), or a(n) ~ sqrt(2*Pi) * exp(-n*s-1/2*(s-1)^2) * (n*s)^(n*s+1/2) * (s!)^(-2*n). - Vaclav Kotesovec, Aug 04 2013

Examples

			a(4) = 1 because there is only one possible 4 X 4 (0,1) matrix with all row and column sums equal to 4, the matrix of all 1's. a(5) = 120 = 5! because there are 5X4X3X2X1 ways of placing a zero in each successive column (row) so that it is not in the same row (column) as any previously placed.
		

References

  • B. R. Perez-Salvador, S. de los Cobos Silva, M. A. Gutierrez-Andrade and A. Torres-Chazaro, A Reduced Formula for Precise Numbers of (0,1) Matrices in a(R,S), Disc. Math., 2002, 256, 361-372.

Crossrefs

Column 4 of A008300. Row sums of A284991.

Formula

a(n) = 24^{-n} sum_{alpha +beta + gamma + mu + u =n}frac{3^{ gamma }(-6)^{beta +u }8^{ mu }(n!)^{2}(4alpha +2 gamma + mu )!(beta +2 gamma )!}{alpha!beta! gamma! mu!u!} sum_{i=0}^{ floor (beta +2 gamma )/2 }frac{1}{24^{alpha - gamma +i}2^{beta +2 gamma -i}i!(beta +2 gamma -2i)!(alpha - gamma +i)!} - Shanzhen Gao, Nov 07 2007
From Vaclav Kotesovec, Aug 04 2013: (Start)
a(n) ~ exp(-1/2)*C(n,4)^(2*n)/C(n^2,4*n), (Canfield + McKay, 2004).
a(n) ~ sqrt(Pi)*2^(2*n+3/2)*9^(-n)*exp(-4*n-9/2)*n^(4*n+1/2).
(End)

Extensions

More terms from Gordon G. Cash (cash.gordon(AT)epa.gov), Oct 22 2002
More terms from Vladeta Jovovic, Nov 12 2006

A003438 Number of 5 X 5 matrices with nonnegative integer entries and row and column sums equal to n.

Original entry on oeis.org

1, 120, 6210, 153040, 2224955, 22069251, 164176640, 976395820, 4855258305, 20856798285, 79315936751, 272095118010, 854560160105, 2486299719645, 6765755480415, 17356306529251, 42250330784180, 98137852369965
Offset: 0

Views

Author

Keywords

Comments

Number of 5 X 5 stochastic matrices of integers.

References

  • D. M. Jackson and G. H. J. van Rees, The enumeration of generalized double stochastic nonnegative integer square matrices, SIAM J. Comput., 4 (1975), 474-477.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 1, 1986, p. 234.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+103x+4306x^2+63110x^3+388615x^4+1115068x^5+ 1575669x^6+1115068x^7+388615x^8+63110x^9+4306x^10+103x^11+x^12)/ (1-x)^17,{x,0,30}],x] (* Harvey P. Dale, Aug 17 2013 *)

Formula

G.f.: (1 + 103*x + 4306*x^2 + 63110*x^3 + 388615*x^4 + 1115068*x^5 + 1575669*x^6 + 1115068*x^7 + 388615*x^8 + 63110*x^9 + 4306*x^10 + 103*x^11 + x^12)/(1-x)^17.
a(n) = Sum_{j=0..6} A005466(j) * binomial(4+j+n, 4+2*j). - Andrew Howroyd, Apr 09 2020

Extensions

More terms from Vladeta Jovovic, Feb 06 2000
Showing 1-10 of 19 results. Next