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

A034841 a(n) = (n^2)! / (n!)^n.

Original entry on oeis.org

1, 1, 6, 1680, 63063000, 623360743125120, 2670177736637149247308800, 7363615666157189603982585462030336000, 18165723931630806756964027928179555634194028454000000, 53130688706387569792052442448845648519471103327391407016237760000000000
Offset: 0

Views

Author

Keywords

Comments

The number of arrangements of 1,2,...,n^2 in an n X n matrix such that each row is increasing. - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 12 2001
a(n) == 0 (mod n!). In fact (n^2)! == 0 (mod (n!)^n) by elementary combinatorics, a better result is (n^2)! == 0 (mod (n!)^(n+1)). - Amarnath Murthy, Jul 13 2005
a(n) is also the number of lattice paths from {n}^n to {0}^n using steps that decrement one component by 1. a(2) = 6: [(2,2), (1,2), (0,2), (0,1), (0,0)], [(2,2), (1,2), (1,1), (0,1), (0,0)], [(2,2), (1,2), (1,1), (1,0), (0,0)], [(2,2), (2,1), (1,1), (0,1), (0,0)], [(2,2), (2,1), (1,1), (1,0), (0,0)], [(2,2), (2,1), (2,0), (1,0), (0,0)]. - Alois P. Heinz, May 06 2013
Given n^2 distinguishable balls and n distinguishable urns, a(n) = the number of ways to place n balls in the i-th urn for all 1 <= i <= n, where n = n_1 + n_2 + ... + n_n. - Ross La Haye, Dec 28 2013

Crossrefs

Programs

  • Magma
    [Factorial(n^2) / Factorial(n)^n: n in [0..10]]; // Vincenzo Librandi, Oct 29 2014
  • Maple
    a:= n-> (n^2)! / (n!)^n:
    seq(a(n), n=0..10);  # Alois P. Heinz, Jul 24 2012
  • Mathematica
    Prepend[Table[nn = n^2;nn! Coefficient[Series[(x^n/n!)^n, {x, 0, nn}], x^nn], {n, 1, 15}], 1] (* Geoffrey Critzer, Mar 08 2015 *)
  • PARI
    a(n) = (n^2)! / (n!)^n; \\ Michel Marcus, Oct 28 2014
    

Formula

Using a higher order version of Stirling's formula (the "standard" formula appears in A000142) we have the asymptotic expression: a(n) ~ sqrt(2*Pi) * e^(-1/12) * n^(n^2 - n/2 + 1) / (2*Pi)^(n/2). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 13 2001
a(n) = Product_{k=1..n} binomial(k*n, n). - Vaclav Kotesovec, Mar 10 2019

Extensions

a(0)=1 prepended by Tilman Piesk, Oct 28 2014

A340591 Number A(n,k) of n*(k+1)-step k-dimensional nonnegative closed lattice walks starting at the origin and using steps that increment all components or decrement one component by 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 6, 16, 5, 1, 1, 24, 288, 192, 14, 1, 1, 120, 9216, 24444, 2816, 42, 1, 1, 720, 460800, 7303104, 2738592, 46592, 132, 1, 1, 5040, 33177600, 4234233600, 8204167296, 361998432, 835584, 429, 1, 1, 40320, 3251404800, 4223111040000, 59027412643200, 11332298092032, 53414223552, 15876096, 1430, 1
Offset: 0

Views

Author

Alois P. Heinz, Jan 12 2021

Keywords

Examples

			Square array A(n,k) begins:
  1,  1,     1,         1,              1,                   1, ...
  1,  1,     2,         6,             24,                 120, ...
  1,  2,    16,       288,           9216,              460800, ...
  1,  5,   192,     24444,        7303104,          4234233600, ...
  1, 14,  2816,   2738592,     8204167296,      59027412643200, ...
  1, 42, 46592, 361998432, 11332298092032, 1052109889288796160, ...
		

Crossrefs

Columns k=0-3 give: A000012, A000108, A006335, A340540.
Rows n=0-2 give: A000012, A000142, |A055546|.
Main diagonal gives A340590.
Cf. A335570.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1, (k-> add(
         `if`(l[i]>0, b(n-1, sort(subsop(i=l[i]-1, l))), 0), i=1..k)+
         `if`(add(i, i=l)+k x+1, l)), 0))(nops(l)))
        end:
    A:= (n, k)-> b(k*n+n, [0$k]):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, 1, Function[k, Sum[
      If[l[[i]]>0, b[n-1, Sort[ReplacePart[l, i -> l[[i]]-1]]], 0], {i, 1, k}]+
      If[Sum[i, {i, l}] + k < n, b[n - 1, Map[#+1&, l]], 0]][Length[l]]];
    A[n_, k_] := b[k*n + n, Table[0, {k}]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jan 26 2021, after Alois P. Heinz *)
Showing 1-2 of 2 results.