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 12 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
    

A321721 Number of non-isomorphic non-normal semi-magic square multiset partitions of weight n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 7, 2, 10, 7, 12, 2, 38, 2, 21, 46, 72, 2, 162, 2, 420, 415, 64, 2, 4987, 1858, 110, 9336, 45456, 2, 136018, 2, 1014658, 406578, 308, 3996977, 34937078, 2, 502, 28010167, 1530292965, 2, 508164038, 2, 54902992348, 51712929897, 1269, 2, 3217847072904, 8597641914, 9168720349613
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal semi-magic square multiset partition of weight n is a multiset partition of weight n whose part sizes and vertex degrees are all equal to d, for some d|n.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.
Also the number of nonnegative integer square matrices up to row and column permutations with sum of elements equal to n and no zero rows or columns, with row sums and column sums all equal to d, for some d|n.

Examples

			Non-isomorphic representatives of the a(2) = 2 through a(6) = 7 multiset partitions:
  {{11}}   {{111}}     {{1111}}       {{11111}}         {{111111}}
  {{1}{2}} {{1}{2}{3}} {{11}{22}}     {{1}{2}{3}{4}{5}} {{111}{222}}
                       {{12}{12}}                       {{112}{122}}
                       {{1}{2}{3}{4}}                   {{11}{22}{33}}
                                                        {{11}{23}{23}}
                                                        {{12}{13}{23}}
                                                        {{1}{2}{3}{4}{5}{6}}
Inequivalent representatives of the a(6) = 7 matrices:
  [6]
.
  [3 0] [2 1]
  [0 3] [1 2]
.
  [2 0 0] [2 0 0] [1 1 0]
  [0 2 0] [0 1 1] [1 0 1]
  [0 0 2] [0 1 1] [0 1 1]
.
  [1 0 0 0 0 0]
  [0 1 0 0 0 0]
  [0 0 1 0 0 0]
  [0 0 0 1 0 0]
  [0 0 0 0 1 0]
  [0 0 0 0 0 1]
Inequivalent representatives of the a(9) = 7 matrices:
  [9]
.
  [3 0 0] [3 0 0] [2 1 0] [2 1 0] [1 1 1]
  [0 3 0] [0 2 1] [1 1 1] [1 0 2] [1 1 1]
  [0 0 3] [0 1 2] [0 1 2] [0 2 1] [1 1 1]
.
  [1 0 0 0 0 0 0 0 0]
  [0 1 0 0 0 0 0 0 0]
  [0 0 1 0 0 0 0 0 0]
  [0 0 0 1 0 0 0 0 0]
  [0 0 0 0 1 0 0 0 0]
  [0 0 0 0 0 1 0 0 0]
  [0 0 0 0 0 0 1 0 0]
  [0 0 0 0 0 0 0 1 0]
  [0 0 0 0 0 0 0 0 1]
		

Crossrefs

Formula

a(p) = 2 for p prime corresponding to the 1 X 1 square [p] and the permutation matrices of size p X p with partition (1...10...0). - Chai Wah Wu, Jan 16 2019
a(n) = Sum_{d|n} A333733(d,n/d) for n > 0. - Andrew Howroyd, Apr 11 2020

Extensions

a(11)-a(13) from Chai Wah Wu, Jan 16 2019
a(14)-a(15) from Chai Wah Wu, Jan 20 2019
Terms a(16) and beyond from Andrew Howroyd, Apr 11 2020

A333737 Array read by antidiagonals: T(n,k) is the number of non-isomorphic n X n nonnegative integer symmetric matrices with all row and column sums equal to k up to permutations of rows and columns.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 5, 5, 1, 1, 1, 1, 3, 9, 12, 7, 1, 1, 1, 1, 4, 13, 33, 29, 11, 1, 1, 1, 1, 4, 20, 74, 142, 79, 15, 1, 1, 1, 1, 5, 28, 163, 556, 742, 225, 22, 1, 1, 1, 1, 5, 39, 319, 1919, 5369, 4454, 677, 30, 1, 1
Offset: 0

Views

Author

Andrew Howroyd, Apr 08 2020

Keywords

Comments

Terms may be computed without generating each matrix by enumerating the number of matrices by column sum sequence using dynamic programming. A PARI program showing this technique for the labeled case is given in A188403. Burnside's lemma as applied in A318805 can be used to extend this method to the unlabeled case.

Examples

			Array begins:
==============================================
n\k | 0 1  2   3    4     5      6       7
----+-----------------------------------------
  0 | 1 1  1   1    1     1      1       1 ...
  1 | 1 1  1   1    1     1      1       1 ...
  2 | 1 1  2   2    3     3      4       4 ...
  3 | 1 1  3   5    9    13     20      28 ...
  4 | 1 1  5  12   33    74    163     319 ...
  5 | 1 1  7  29  142   556   1919    5793 ...
  6 | 1 1 11  79  742  5369  31781  156191 ...
  7 | 1 1 15 225 4454 64000 692599 5882230 ...
  ...
The T(3,3) = 5 matrices are:
   [0 0 3]  [0 1 2]  [0 1 2]  [1 0 2]  [1 1 1]
   [0 3 0]  [1 1 1]  [1 2 0]  [0 3 0]  [1 1 1]
   [3 0 0]  [2 1 0]  [2 0 1]  [2 0 1]  [1 1 1]
		

Crossrefs

Columns n=0..5 are A000012, A000012, A000041, A333888, A333889, A333890.
Main diagonal is A333738.
Cf. A188403 (labeled case), A333159 (binary), A333733 (not necessarily symmetric).

A321724 Irregular triangle read by rows where T(n,k) is the number of non-isomorphic non-normal semi-magic square multiset partitions of weight n and length d = A027750(n, k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 5, 1, 1, 5, 1, 1, 3, 7, 1, 1, 1, 1, 4, 9, 12, 11, 1, 1, 1, 1, 4, 15, 1, 1, 13, 31, 1, 1, 5, 43, 22, 1, 1, 1, 1, 5, 22, 103, 30, 1, 1, 1, 1, 6, 106, 264, 42, 1, 1, 30, 383, 1, 1, 6, 56, 1, 1, 1, 1, 7, 45, 321, 2804, 1731, 77, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

Also the number of nonnegative integer square matrices up to row and column permutations with sum of elements equal to n and no zero rows or columns, with row sums and column sums all equal to d.
A non-normal semi-magic square multiset partition of weight n is a multiset partition of weight n whose part sizes and vertex degrees are all equal to d, for some d|n.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Triangle begins:
  1
  1 1
  1 1
  1 2 1
  1 1
  1 2 3 1
  1 1
  1 3 5 1
  1 5 1
  1 3 7 1
Inequivalent representatives of the T(10,3) = 7 semi-magic squares (zeros not shown):
  [2    ] [2    ] [2    ] [2    ] [2    ] [11   ] [11   ]
  [ 2   ] [ 2   ] [ 2   ] [ 11  ] [ 11  ] [11   ] [1 1  ]
  [  2  ] [  2  ] [  11 ] [ 11  ] [ 1 1 ] [  11 ] [ 1 1 ]
  [   2 ] [   11] [  1 1] [   11] [  1 1] [  1 1] [  1 1]
  [    2] [   11] [   11] [   11] [   11] [   11] [   11]
		

Crossrefs

Formula

T(n,k) = A333733(d, n/d), where d = A027750(n, k). - Andrew Howroyd, Apr 11 2020

Extensions

a(28)-a(39) from Chai Wah Wu, Jan 16 2019
Terms a(40) and beyond from Andrew Howroyd, Apr 11 2020
Edited by Peter Munn, Mar 05 2025

A052282 Number of 3 X 3 stochastic matrices under row and column permutations.

Original entry on oeis.org

1, 1, 3, 5, 9, 13, 22, 30, 45, 61, 85, 111, 149, 189, 244, 304, 381, 465, 571, 685, 825, 977, 1158, 1354, 1585, 1833, 2121, 2431, 2785, 3165, 3596, 4056, 4573, 5125, 5739, 6393, 7117, 7885, 8730, 9626, 10605, 11641, 12769, 13959, 15249, 16609, 18076, 19620
Offset: 0

Views

Author

Vladeta Jovovic, Feb 06 2000

Keywords

Comments

Unreduced numerators in convergent to log(2) = lim[n->inf, a(n)/A000670(n+1)].

Examples

			There are 5 nonisomorphic 3 X 3 matrices with row and column sums 3:
[0 0 3] [0 0 3] [0 1 2] [0 1 2] [1 1 1]
[0 3 0] [1 2 0] [1 1 1] [1 2 0] [1 1 1]
[3 0 0] [2 1 0] [2 1 0] [2 0 1] [1 1 1]
		

Crossrefs

Row n=3 of A333733.
Cf. A002817, A052280, A052281. Different from A001993.

Programs

  • Maple
    a:= n -> (Matrix([[1, 0, 0, 1, 1, 3, 5, 9, 13]]). Matrix(9, (i,j)-> if (i=j-1) then 1 elif j=1 then [2, 1, -3, -1, 1, 3, -1, -2, 1][i] else 0 fi)^n)[1,1]: seq(a(n), n=0..50);  # Alois P. Heinz, Jul 31 2008
  • Mathematica
    LinearRecurrence[{2,1,-3,-1,1,3,-1,-2,1},{1,1,3,5,9,13,22,30,45},50] (* Harvey P. Dale, Mar 10 2018 *)

Formula

G.f.: (x^6-x^5+x^3-x+1)/((1-x)^5*(1+x)^2*(1+x+x^2)). - Ralf Stephan and Vladeta Jovovic, May 07 2004

A377060 Array read by antidiagonals: T(n,k) is the number of inequivalent n X k nonnegative integer matrices with all column sums n and row sums k up to permutation of rows and columns.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 5, 3, 1, 1, 1, 1, 3, 9, 9, 3, 1, 1, 1, 1, 4, 14, 43, 14, 4, 1, 1, 1, 1, 4, 28, 147, 147, 28, 4, 1, 1, 1, 1, 5, 44, 661, 1856, 661, 44, 5, 1, 1, 1, 1, 5, 73, 2649, 25888, 25888, 2649, 73, 5, 1, 1
Offset: 0

Views

Author

Andrew Howroyd, Oct 14 2024

Keywords

Comments

Terms may be computed without generating each matrix by enumerating the number of matrices by column sum sequence using dynamic programming. A PARI program showing this technique for the labeled case is given in A333901. Burnside's lemma can be used to extend this method to the unlabeled case. This seems to require looping over partitions for both rows and columns.

Examples

			Array begins:
==================================================
n\k | 0 1 2  3    4      5        6          7 ...
----+---------------------------------------------
  0 | 1 1 1  1    1      1        1          1 ...
  1 | 1 1 1  1    1      1        1          1 ...
  2 | 1 1 2  2    3      3        4          4 ...
  3 | 1 1 2  5    9     14       28         44 ...
  4 | 1 1 3  9   43    147      661       2649 ...
  5 | 1 1 3 14  147   1856    25888     346691 ...
  6 | 1 1 4 28  661  25888  1217727   55138002 ...
  7 | 1 1 4 44 2649 346691 55138002 8597641912 ...
  ...
		

Crossrefs

Main diagonal is A333734.
Columns k=0..4 are A000012, A000012, A008619, A377061, A377062.

Formula

T(n,k) = T(k,n).

A052280 Number of 4 X 4 stochastic matrices under row and column permutations.

Original entry on oeis.org

1, 1, 5, 12, 43, 106, 321, 787, 1960, 4354, 9386, 18790, 36362, 66789, 118936, 203840, 340195, 551192, 873343, 1351457, 2052221, 3056798, 4480565, 6462678, 9194098, 12902867, 17892986, 24524478, 33265476, 44666016, 59426834, 78364873, 102502765, 133024660, 171390035, 219278224
Offset: 0

Views

Author

Vladeta Jovovic, Feb 06 2000

Keywords

Examples

			There are 5 nonisomorphic 4 X 4 matrices with row and column sums 2:
[0 0 0 2] [0 0 0 2] [0 0 0 2] [0 0 1 1] [0 0 1 1]
[0 0 2 0] [0 0 2 0] [0 1 1 0] [0 0 1 1] [0 1 0 1]
[0 2 0 0] [1 1 0 0] [1 0 1 0] [1 1 0 0] [1 0 1 0]
[2 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0]
		

Crossrefs

Row n=4 of A333733.

Extensions

Terms a(9) and beyond from Andrew Howroyd, Apr 04 2020

A232215 Number of n X n matrices (up to permutation of their rows and columns) with nonnegative integer entries with all row and column sums equal to 3.

Original entry on oeis.org

1, 1, 2, 5, 12, 31, 103, 383, 1731, 9273, 57563, 406465, 3212131, 28009976, 266688867, 2749264797, 30480560319, 361435864747, 4562860845767, 61084137737436, 864206301930764, 12882343725953858, 201788397502682460, 3313420771907580764, 56910480298885139055
Offset: 0

Views

Author

N. J. A. Sloane, Nov 22 2013

Keywords

Comments

Arises from counting of symmetric tensor invariants without color. See Geloun-Ramgoolam, Section 6.2 for information and Mathematica code.

Examples

			a(2) = 2 because there are 2 such 2 X 2 matrices: [1 2;2 1] and [3 0;0 3]. - _Nathaniel Johnston_, Oct 12 2016
		

Crossrefs

Column k=3 of A333733.
Cf. A328159.

Formula

a(n) = 1 + Sum_{i=1..n} A328159(i). - Brendan McKay, Oct 05 2019

Extensions

New name and a(9)-a(11) from Nathaniel Johnston, Oct 12 2016
a(12) and a(13) from Brendan McKay, Oct 05 2019
a(0)=1 prepended, a(12)-a(13) corrected and terms a(14) and beyond from Andrew Howroyd, Apr 04 2020

A333734 Number of non-isomorphic n X n nonnegative integer matrices with all row and column sums equal to n up to permutations of rows and columns.

Original entry on oeis.org

1, 1, 2, 5, 43, 1856, 1217727, 8597641912, 646296747486387, 535435113671568180963, 5081029530811947425598907884, 570680215340337514993573217774604779, 779646755088025699677478853259568262608053838
Offset: 0

Views

Author

Andrew Howroyd, Apr 04 2020

Keywords

Examples

			The a(2) = 2 matrices are:
  [1 1]  [2 0]
  [1 1]  [0 2]
.
The a(3) = 5 matrices are:
  [1 1 1]   [2 1 0]   [2 1 0]   [3 0 0]   [3 0 0]
  [1 1 1]   [1 1 1]   [0 2 1]   [0 2 1]   [0 3 0]
  [1 1 1]   [0 1 2]   [1 0 2]   [0 1 2]   [0 0 3]
		

Crossrefs

Main diagonal of A333733 and A377060.
Cf. A110058.

Extensions

a(11)-a(12) from Andrew Howroyd, Oct 14 2024

A232216 Number of non-isomorphic n X n nonnegative integer matrices with all row and column sums equal to 4 up to permutations of rows and columns.

Original entry on oeis.org

1, 1, 3, 9, 43, 264, 2804, 44524, 1012456, 30502320, 1166185222, 54902972542, 3115560948081, 209575881782122, 16484822517084705, 1498893370236782629, 155996155818460127750, 18424063865105027559797, 2450806855748517847761175, 364738110721163795332103692, 60368334488355648041244493885
Offset: 0

Views

Author

N. J. A. Sloane, Nov 22 2013

Keywords

Comments

Arises from counting of symmetric tensor invariants without color. See Geloun-Ramgoolam, Section 6.2 for information and Mathematica code.

Crossrefs

Column k=4 of A333733.

Extensions

Name changed, a(0)=1 prepended and a(9)-a(20) from Andrew Howroyd, Apr 04 2020
Showing 1-10 of 12 results. Next