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 15 results. Next

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

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

A269742 Triangle of generalized Eulerian numbers T(n,k) = _2 read by rows, n >= 1, 0 <= k < 2*n.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 11, 4, 1, 1, 11, 72, 114, 72, 11, 1, 1, 26, 367, 1492, 2438, 1492, 367, 26, 1, 1, 57, 1630, 13992, 48965, 73120, 48965, 13992, 1630, 57, 1, 1, 120, 6680, 109538, 727982, 2169674, 3107640, 2169674, 727982, 109538, 6680, 120, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 16 2016

Keywords

Comments

T(n,k) is the number of nonnegative integer n X n matrices with every row and column sum 2 and sum of entries below the main diagonal k. The case when every row and column sum is 1 is given by the Eulerian numbers (A008292). - Andrew Howroyd, Feb 22 2020

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 4, 11, 4, 1;
  1, 11, 72, 114, 72, 11, 1;
  1, 26, 367, 1492, 2438, 1492, 367, 26, 1;
  1, 57, 1630, 13992, 48965, 73120, 48965, 13992, 1630, 57, 1;
  ...
The matrices for row n=3, k=0..2 are:
  [2 0]  [1 1]  [0 2]
  [0 2]  [1 1]  [2 0]
		

Crossrefs

Row sums are A000681.
Columns k=0..4 are A000012, A000295, A260585, A260575, A260582.
Central coefficients are A332729.

Programs

Extensions

Terms a(26) and beyond from Andrew Howroyd, Feb 22 2020

A123543 Number of connected labeled 2-regular pseudodigraphs (multiple arcs and loops allowed) of order n.

Original entry on oeis.org

0, 1, 2, 14, 201, 4704, 160890, 7538040, 462869190, 36055948320, 3474195588360, 405786523413600, 56502317464777800, 9248640671612865600, 1758505909558569771600, 384399253128691423022400, 95737858067835530264718000, 26952922550751326069548608000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2006

Keywords

References

  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1982.

Crossrefs

Connected version of A000681.
First column of A307804.
Cf. A123544.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1,
          n^2*b(n-1)-n*(n-1)^2*b(n-2)/2)
        end:
    a:= proc(n) option remember; `if`(n=0, 0, b(n)-
          add(j*binomial(n, j)*b(n-j)*a(j), j=1..n-1)/n)
        end:
    seq(a(n), n=0..17);  # Alois P. Heinz, Mar 22 2025
  • Mathematica
    m = 16;
    a681[n_] := n!*HypergeometricPFQ[{1/2, -n}, {}, -2]/2^n;
    egf = Log[1 + Sum[a681[k] x^k/k!, {k, 1, m}]];
    CoefficientList[egf + O[x]^m, x] Range[0, m-1]! (* Jean-François Alcover, Aug 26 2019 *)
  • PARI
    seq(n)={Vec(serlaplace(log(serlaplace(exp(x/2 + O(x*x^n))/sqrt(1-x + O(x*x^n))))), -(n+1))}; \\ Andrew Howroyd, Sep 09 2018

Formula

E.g.f.: log(1 + Sum_{k>0} A000681(k)*x^k/k!). - Andrew Howroyd, Sep 09 2018
a(n) ~ 2 * sqrt(Pi) * n^(2*n + 1/2) / exp(2*n - 1/2). - Vaclav Kotesovec, Jul 11 2025

A134648 Number of 2n X n (0,1)-matrices with row sums 2 and column sums 4.

Original entry on oeis.org

0, 1, 90, 44730, 56586600, 154700988750, 807998767676100, 7373018003758407000, 109829050417159537464000, 2532230252503738514963235000, 86574740102712303011539719750000, 4237239732072431006302896746240010000
Offset: 1

Views

Author

Shanzhen Gao, Nov 05 2007

Keywords

Comments

t(m,n) in the formula gives the number of (0,1)-matrices of size m*n with row sum 4 and column sum 2. a(n) in the formula gives the number of (0,1)-matrices of size n*(2n) with row sum 4 and column sum 2. - Shanzhen Gao, Feb 16 2010

Examples

			Number of  4 X 2 (0,1)-matrices:       1;
Number of  6 X 3 (0,1)-matrices:      90;
Number of  8 X 4 (0,1)-matrices:   44730;
Number of 10 X 5 (0,1)-matrices: 5658660.
		

References

  • Gao, Shanzhen, and Matheis, Kenneth, 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.

Crossrefs

Programs

  • Magma
    B:=Binomial; F:=Factorial;
    f:= func< m,n,k,j | B(m, k)*B(m-k, j)*B(2*m+2*k-2*j, m+k-j)*F(m+k-j) >;
    t:= func< m,n | ((-1)^m*F(n)/8^m)*(&+[(&+[f(m,n,k,j)*(-1)^(j+k)/(12)^k: k in [0..m-j]]): j in [0..m]]) >;
    A134648:= func< n | F(2*n)*t(n,n)/F(n) >;
    [A134648(n): n in [1..30]]; // G. C. Greubel, Oct 13 2023
    
  • Mathematica
    t[m_, n_]:= t[m, n]= ((-1)^m*n!/8^m)*Sum[Binomial[m,k]*Binomial[m-k,j]*Binomial[2*m+2*k-2*j,m+k-j]*(m+k-j)!*(-1)^(j+k)/(12)^k, {j,0, m}, {k,0,m-j}];
    A134648[n_]:= (2*n)!*t[n,n]/n!;
    Table[A134648[n], {n,30}] (* G. C. Greubel, Oct 13 2023 *)
  • SageMath
    b=binomial; F=factorial;
    def f(m,n,k,j): return b(m, k)*b(m-k, j)*b(2*m+2*k-2*j, m+k-j)*F(m+k-j)
    def t(m,n): return ((-1)^m*F(n)/8^m)*sum(sum(f(m,n,k,j)*(-1)^(j+k)/(12)^k for k in range(m-j+1)) for j in range(m+1))
    def A134648(n): return F(2*n)*t(n,n)/F(n)
    [A134648(n) for n in range(1,31)] # G. C. Greubel, Oct 13 2023

Formula

a(n) = (2*n)!*t(n,n)/n!, where t(m, n) = (1/24^m)*Sum_{j=0..m} Sum_{k=0..m-j} ( (-1)^(m-j-k)*3^j*6^(m-j-k)*m!*n!*(4*k+2*(m-j-k))! )/( j!*k!*(m-j-k)!*(2*k+(m-j-k))!*2^(2*k+(m-j-k)) ).
a(n) = (1/24^n)*Sum_{j=0..n} Sum_{k=0..n-j} ((-1)^(n-j-k)*3^j*6^(n-j-k)*n!(2n)!(2n-2j+2k)!/(j!k!(n-j-k)!(n-j+k)!*2^(n-j+k))). - Shanzhen Gao, Feb 16 2010
a(n) ~ sqrt(Pi) * 2^(3*n + 3/2) * n^(4*n + 1/2) / (3^n * exp(4*n + 3/2)). - Vaclav Kotesovec, Oct 21 2023

Extensions

a(7) onwards from R. H. Hardin, Oct 18 2009

A307804 Triangle T(n,k) read by rows: number of labeled 2-regular digraphs (multiple arcs and loops allowed) on n nodes with k components.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 14, 6, 1, 0, 201, 68, 12, 1, 0, 4704, 1285, 200, 20, 1, 0, 160890, 36214, 4815, 460, 30, 1, 0, 7538040, 1422288, 160594, 13755, 910, 42, 1, 0, 462869190, 74416131, 7151984, 535864, 33110, 1624, 56, 1, 0, 36055948320, 5016901734, 413347787, 26821368, 1490664, 70686, 2688, 72, 1
Offset: 0

Views

Author

R. J. Mathar, Apr 29 2019

Keywords

Examples

			Triangle T(n,k) starts:
  1;
  0,       1;
  0,       2,       1;
  0,      14,       6,      1;
  0,     201,      68,     12,     1;
  0,    4704,    1285,    200,    20,   1;
  0,  160890,   36214,   4815,   460,  30,  1;
  0, 7538040, 1422288, 160594, 13755, 910, 42, 1;
  ...
		

Crossrefs

Cf. A123543 (column k=1), A000681 (row sums).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1,
          n^2*b(n-1)-n*(n-1)^2*b(n-2)/2)
        end:
    a:= proc(n) option remember; `if`(n=0, 0, b(n)-
          add(j*binomial(n, j)*b(n-j)*a(j), j=1..n-1)/n)
        end:
    g:= proc(n, k) option remember; `if`(n=0, x^k/k!,
          add(g(n-j, k+1)*a(j)*binomial(n,j), j=1..n))
        end:
    T:= (n,k)-> coeff(g(n, 0), x, k):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Mar 22 2025
  • Mathematica
    b[n_] := b[n] = If[n < 2, 1, n^2*b[n - 1] - n*(n - 1)^2*b[n - 2]/2];
    a[n_] := a[n] = If[n == 0, 0, b[n] - Sum[j*Binomial[n, j]*b[n - j]*a[j], {j, 1, n - 1}]/n];
    g[n_, k_] := g[n, k] = If[n == 0, x^k/k!, Sum[g[n - j, k + 1]*a[j]* Binomial[n, j], {j, 1, n}]];
    T[n_, k_] := Coefficient[g[n, 0], x, k];
    Table[Table[T[n, k], { k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 16 2025, after Alois P. Heinz *)

Formula

T(n,1) = A123543(n).
T(n,k) = Sum_{Compositions n=n_1+n_2+...n_k, n_i>=1} multinomial(n; n_1,n_2,..,n_k) * T(n_1,1) * T(n_2,1)*... *T(n_k,1)/ k!.
E.g.f.: Sum_{n,k>=0} T(n,k)*x^n*t^k/n! = exp(t*E123543(x)) where E123543(x) = Sum_{n>=1} A123543(n)*x^n/t^n. [Gilbert]. - R. J. Mathar, May 08 2019
Conjectures from Mikhail Kurkov, Mar 22 2025: (Start)
Recursion for the k-th column (independently of other columns): T(n,k) = (1/(n-k))*Sum_{j=2..n-k+1} c(j-1)*binomial(n,j)*T(n-j+1,k) for 1 <= k < n with T(n,n) = 1 where b(n) = A123543(n), c(n) = n*b(n+1) - Sum_{j=1..n-1} binomial(n+1,j+1)*b(n-j+1)*c(j) for n > 0.
Production matrix is binomial(n,k)*d(n-k) (starting from the first row) for 0 <= k <= n, 0 otherwise where d(n) = E_n^{(-1)} from A356145 with a_k = b(k+1) for k > 0 (see Tom Copeland link).
The same things seems to work for any b(n) with b(1) = 1 (I mean that it works for e.g.f. exp(t*F(x)) where F(x) = Sum_{n>=1} b(n)*x^n/n!). (End)

A002018 From a distribution problem.

Original entry on oeis.org

1, 1, 4, 33, 480, 11010, 367560, 16854390, 1016930880, 78124095000, 7446314383200, 862332613342200, 119261328828364800, 19415283189746043600, 3675162134109650184000, 800409618620667941886000, 198730589981586780813696000, 55800304882692417053710704000
Offset: 0

Views

Author

Keywords

References

  • H. Anand, V. C. Dumir and H. Gupta, A combinatorial distribution problem, Duke Math. J., 33 (1996), 757-769.
  • 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).

Crossrefs

Cf. A000681.

Programs

  • Mathematica
    b[n_] := Sum[(2i)!*n!^2/(2^i*i!^2*(n-i)!), {i, 0, n}]/2^n; a[n_] := n*(2n-1)*b[n-1] - n*(n-1)^2*b[n-2]; a[0]=1; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Aug 08 2012, after formula *)

Formula

a(n) = n*(2*n-1)*b(n-1) - n*(n-1)^2*b(n-2), b(n) = A000681(n). [corrected by Seiichi Manyama, Apr 22 2025]
From Seiichi Manyama, Apr 22 2025: (Start)
a(n) = (n-1)! * n! * Sum_{k=0..n-1} (-1)^k * (1/2)^(n-k-1) * binomial(-3/2,k)/(n-k-1)! for n > 0.
a(n) = (n-1)! * n! * [x^(n-1)] 1/(1-x)^(3/2) * exp(x/2) for n > 0.
a(n) = n * ( n*a(n-1) - (n-1)*(n-2)/2 * a(n-2) ) for n > 1. (End)
a(n) ~ 4 * sqrt(Pi) * n^(2*n + 1/2) / exp(2*n - 1/2). - Vaclav Kotesovec, Apr 24 2025

Extensions

More terms from David W. Wilson

A134646 Number of n X n (0,1,2)-matrices with every row sum 3 and column sum 3.

Original entry on oeis.org

0, 2, 31, 1344, 111920, 16214000, 3758757240, 1310799454720, 655551508577280, 452647176631372800, 418399785559398720000, 504669505260741099417600, 777461035821119354357452800, 1501959201213688265322501427200
Offset: 1

Views

Author

Shanzhen Gao, Nov 05 2007

Keywords

Examples

			a(2) = 2:
21 12
12 21
		

References

  • Zhonghua Tan, Shanzhen Gao, Kenneth Mathies, Joshua Fallon, Counting (0,1,2)-Matrices, Congressus Numeratium, December 2008.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(-4)^(n - alpha - beta) * 3^beta * n!^2 * (beta + 3*alpha)! / (alpha!^2 * beta! * (n - alpha - beta)! * 6^(n + alpha)), {beta, 0, n - alpha}], {alpha, 0, n}], {n, 1, 20}] (* Vaclav Kotesovec, Oct 21 2023 *)

Formula

a(n) = Sum_{alpha = 0 .. n} Sum_{beta = 0 .. n-alpha } (-4)^(n - alpha - beta) * 3^beta * n!^2 * (beta + 3*alpha)! / (alpha!^2 * beta! * (n - alpha - beta)! * 6^(n + alpha)).
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 21 2023

Extensions

Definition corrected and a(7) and a(8) found (by direct enumeration) by R. H. Hardin, Oct 18 2009
a(9) - a(99) from R. H. Hardin Feb 06 2010

A172806 Number of n X n of nonnegative integers with all row and column sums equal to 4.

Original entry on oeis.org

1, 1, 5, 120, 10147, 2224955, 1047649905, 936670590450, 1455918295922650, 3680232136895819610, 14356628851597700179050, 82857993930808028192521800, 683327637694741065563262206250, 7821620120684573354895941635688250
Offset: 0

Views

Author

R. H. Hardin, Feb 06 2010

Keywords

Crossrefs

Showing 1-10 of 15 results. Next