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.

Previous Showing 11-15 of 15 results.

A005650 Number of "magic squares" of order n (see comment line for exact definition).

Original entry on oeis.org

1, 1, 3, 7, 47, 207, 2249, 14501, 216273, 1830449, 34662523, 362983263, 8330310559, 103938238111, 2801976629841, 40574514114061, 1256354802202337, 20708839411614753, 724160187180691379, 13386284447024070647
Offset: 0

Views

Author

Keywords

Comments

This is the number of n X n square arrays with nonnegative integer entries in which every row and column add to 2 (A000681) normalized by dividing by n!/2^floor(n/2).

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 125, #25, A_n.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

Formula

a(n) = A000681(n)*2^floor(n/2)/n!.
a(n) ~ 2^(floor(n/2) + 1/2) * n^n * exp(1/2-n). - Vaclav Kotesovec, Aug 13 2013
Recurrence: a(n) = (2*n^2 - 4*n + 1)*a(n-2) - (n-3)*n*a(n-4). - Vaclav Kotesovec, Aug 13 2013

Extensions

More terms from Vladeta Jovovic, Feb 11 2001

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

Original entry on oeis.org

7, 16260, 747558000, 250071339672000, 369820640830881240000, 1796185853884657144990080000, 23511842995969107700302647865600000, 720289186703359375552628986978410240000000, 46455761324619133018320834819622638940550400000000, 5809177204262302555518772962193269714031251010176000000000
Offset: 1

Views

Author

Shanzhen Gao, Nov 05 2007

Keywords

Examples

			a(1) = 7:
111 210 (6 ways)
111 012
		

References

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

Crossrefs

Programs

  • Maple
    f:=proc(m,n) 6^(-m)*add( (3^i*m!*n!*(2*n-2*i)!)/ (i!*(m-i)!*(n-i)!*2^(n-i)), i=0..m); end;
  • Mathematica
    Table[(3*n)! * (2*n)! / 288^n * Sum[(6*n - 2*i)! * 6^i / (i! * (3*n - i)! * (2*n - i)!), {i, 0, 2*n}], {n, 1, 15}] (* Vaclav Kotesovec, Oct 21 2023 *)
    Table[(2/9)^n * (3*n)! * ((6*n - 1)/2)! * Hypergeometric1F1[-2*n, 1/2 - 3*n, 3/2] / Sqrt[Pi], {n, 1, 15}] (* Vaclav Kotesovec, Oct 21 2023 *)

Formula

Let t(m,n)=6^{-m} sum_{i=0}^{m}frac{3^{i}m!n!(2n-2i)!}{i!(m-i)!(n-i)!2^{n-i}}; then a(n) = t(2n,3n).
a(n) = (3n)!(2n)!288^(-n) * Sum_{i=0..2n} (6n-2i)!6^i/(i!(3n-i)!(2n-i)!). - Shanzhen Gao, Mar 02 2010
a(n) ~ sqrt(Pi) * 2^(n+1) * 3^(4*n + 1/2) * n^(6*n + 1/2) / exp(6*n-1). - Vaclav Kotesovec, Oct 21 2023

Extensions

Corrected, edited and extended with Maple program by R. H. Hardin and N. J. A. Sloane, Oct 18 2009

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.

A361749 a(n) is the number of n X n matrices with nonnegative integer entries, row sums 1,2,...,n and column sums 1,2,...,n.

Original entry on oeis.org

1, 1, 2, 12, 261, 22645, 8264346, 13150070522, 93589674933872, 3036609755945925595, 455845471095088280120142, 320342093420041869298750385976, 1063978124653925432733949863518874116, 16835366182312565093823092118182447742597067
Offset: 0

Views

Author

Robert Israel, Mar 23 2023

Keywords

Examples

			a(3) = 12 because there are 12 possible 3 X 3 matrices with nonnegative integer entries, row sums 1,2,3 and column sums 1,2,3:
  [ 0 0 1 ]   [ 0 0 1 ]   [ 0 0 1 ]   [ 0 0 1 ]
  [ 0 0 2 ]   [ 0 1 1 ]   [ 0 2 0 ]   [ 1 0 1 ]
  [ 1 2 0 ],  [ 1 1 1 ],  [ 1 0 2 ],  [ 0 2 1 ],
  .
  [ 0 0 1 ]   [ 0 1 0 ]   [ 0 1 0 ]   [ 0 1 0 ]
  [ 1 1 0 ]   [ 0 0 2 ]   [ 0 1 1 ]   [ 1 0 1 ]
  [ 0 1 2 ],  [ 1 1 1 ],  [ 1 0 2 ],  [ 0 1 2 ],
  .
  [ 0 1 0 ]   [ 1 0 0 ]   [ 1 0 0 ]   [ 1 0 0 ]
  [ 1 1 0 ]   [ 0 0 2 ]   [ 0 1 1 ]   [ 0 2 0 ]
  [ 0 0 3 ],  [ 0 2 1 ],  [ 0 1 2 ],  [ 0 0 3 ].
		

Crossrefs

Programs

  • Maple
    G:= proc(L,R,k) option remember;
    # number of solutions with first k entries of first row 0
    local m,n,i;
    m:= nops(L); n:= nops(R);
    if m <= 1 then return 1 fi;
    if L[1] > convert(R[k+1..n],`+`) then return 0 fi;
    if k = n-1 then return procname(L[2..-1],subsop(n = R[n]-L[1], R),0) fi;
    add(procname(subsop(1=L[1]-i, L), subsop(k+1=R[k+1]-i, R), k+1), i=0..min(L[1],R[k+1]))
    end proc:
    seq(G([$1..n],[$1..n],0), n=0..8);

Extensions

a(10)-a(13) from Andrew Howroyd, Mar 29 2023
a(0)=1 prepended by Alois P. Heinz, Jun 26 2023

A383280 a(n) = (3/2)^n * Sum_{k=0..n} (1/6)^k * (2*k)! * (n-k)! * binomial(n,k)^2.

Original entry on oeis.org

1, 2, 9, 72, 954, 19980, 624510, 27420120, 1607036760, 120942324720, 11351106055800, 1298791163577600, 177888712528573200, 28728740092874421600, 5401708378739722249200, 1169716267087957140552000, 288993599402729842084464000, 80796133625685147464322528000
Offset: 0

Views

Author

Seiichi Manyama, Apr 22 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = (3/2)^n*sum(k=0, n, (2*k)!*(n-k)!*binomial(n, k)^2/6^k);
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace(serlaplace(1/sqrt(1-x) * exp(3*x/2)))) \\ Joerg Arndt, Apr 22 2025

Formula

a(n) = (n!)^2 * Sum_{k=0..n} (-1)^k * (3/2)^(n-k) * binomial(-1/2,k)/(n-k)!.
a(n) = (n!)^2 * [x^n] 1/sqrt(1-x) * exp(3*x/2).
a(n) = n * ( (n+1)*a(n-1) - 3*(n-1)^2/2 * a(n-2) ) for n > 1.
a(n) ~ 2 * sqrt(Pi) * n^(2*n + 1/2) / exp(2*n - 3/2). - Vaclav Kotesovec, Apr 24 2025
Previous Showing 11-15 of 15 results.