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

A321719 Number of non-normal semi-magic squares with sum of entries equal to n.

Original entry on oeis.org

1, 1, 3, 7, 28, 121, 746, 5041, 40608, 362936, 3635017, 39916801, 479206146, 6227020801, 87187426839, 1307674521272, 20923334906117, 355687428096001, 6402415241245577, 121645100408832001, 2432905938909013343, 51090942176372298027, 1124001180562929946213
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal semi-magic square is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.
Squares must be of size k X k where k is a divisor of n. This implies that a(p) = p! + 1 for p prime since the only allowable squares are of sizes 1 X 1 and p X p. The 1 X 1 square is [p], the p X p squares are necessarily permutation matrices and there are p! permutation matrices of size p X p. Also, a(n) >= n! + 1 for n > 1. - Chai Wah Wu, Jan 13 2019

Examples

			The a(3) = 7 semi-magic squares:
  [3]
.
  [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
  [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
  [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
		

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
    Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Formula

a(p) = p! + 1 for p prime and a(n) >= n! + 1 for n > 1 (see comment above). - Chai Wah Wu, Jan 13 2019
a(n) = Sum_{d|n} A257493(d, n/d) for n > 0. - Andrew Howroyd, Apr 11 2020

Extensions

a(7) from Chai Wah Wu, Jan 13 2019
a(6) corrected and a(8)-a(15) added by Chai Wah Wu, Jan 14 2019
a(16)-a(19) from Chai Wah Wu, Jan 16 2019
Terms a(20) and beyond from Andrew Howroyd, Apr 11 2020

A321717 Number of non-normal (0,1) semi-magic rectangles with sum of all entries equal to n.

Original entry on oeis.org

1, 1, 4, 8, 39, 122, 950, 5042, 45594, 366243, 3858148, 39916802, 494852628, 6227020802, 88543569808, 1308012219556, 21086562956045, 355687428096002, 6427672041650478, 121645100408832002, 2437655776358606198, 51091307191310604724, 1125098543553717372868, 25852016738884976640002, 620752122372339473623314, 15511210044577707470250243
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal semi-magic rectangle is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.
Rectangles must be of size k X m where k and m are divisors of n and k*m >= n. This implies that a(p) = p! + 2 for p prime since the only allowable rectangles are of sizes 1 X 1, 1 X p, p X 1 and p X p. There are no 1 X 1 rectangle that satisfies the condition. The 1 X p and p X 1 rectangles are [1....1] and its transpose, the p X p rectangle are necessarily permutation matrices and there are p! permutation matrices of size p X p. It also shows that a(n) >= n! + 2 for n > 1. - Chai Wah Wu, Jan 13 2019

Examples

			The a(3) = 8 semi-magic rectangles:
  [1 1 1]
.
  [1] [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
  [1] [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
  [1] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
		

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Formula

a(p) = p! + 2 for p prime. a(n) >= n! + 2 for n > 1. - Chai Wah Wu, Jan 13 2019

Extensions

a(7) from Chai Wah Wu, Jan 13 2019
a(8)-a(13) from Chai Wah Wu, Jan 14 2019
a(14)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(19) from Chai Wah Wu, Jan 16 2019
Terms a(20) onward from Max Alekseyev, Dec 04 2024

A321720 Number of non-normal (0,1) semi-magic squares with sum of entries equal to n.

Original entry on oeis.org

1, 1, 2, 6, 25, 120, 726, 5040, 40410, 362881, 3630840, 39916800, 479069574, 6227020800, 87181402140, 1307674370040, 20922977418841, 355687428096000, 6402388104196400, 121645100408832000, 2432903379962038320, 51090942171778378800, 1124000886592995642000, 25852016738884976640000
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A non-normal semi-magic square is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Union[Last/@#]==Range[Max@@First/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Formula

a(p) = p! for p prime as the squares are all permutation matrices of order p and a(n) >= n! for n > 1 (see comments in A321717 and A321719). - Chai Wah Wu, Jan 13 2019
a(n) = Sum_{d|n, d<=n/d} A008300(n/d, d) for n > 0. - Andrew Howroyd, Apr 11 2020

Extensions

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

A321735 Number of (0,1)-matrices with sum of entries equal to n, no zero rows or columns, weakly decreasing row and column sums, and the same row sums as column sums.

Original entry on oeis.org

1, 1, 2, 7, 30, 153, 939, 6653, 53743, 486576
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Examples

			The a(3) = 7 matrices:
  [1 1]
  [1 0]
.
  [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
  [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
  [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
		

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],OrderedQ[Total/@prs2mat[#]],OrderedQ[Total/@Transpose[prs2mat[#]]],Total/@prs2mat[#]==Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Formula

Let c(y) be the coefficient of m(y) in e(y), where m is monomial symmetric functions and e is elementary symmetric functions. Then a(n) = Sum_{|y| = n} c(y).

A321739 Number of non-isomorphic weight-n set multipartitions (multisets of sets) whose part-sizes are also their vertex-degrees.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 12, 21, 46, 94, 208
Offset: 0

Views

Author

Gus Wiseman, Nov 19 2018

Keywords

Comments

Also the number of (0,1) square matrices up to row and column permutations with n ones and no zero rows or columns, with the same multiset of row sums as of column sums.
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

			Non-isomorphic representatives of the a(1) = 1 through a(6) = 12 set multipartitions:
  {1}  {1}{2}  {2}{12}    {12}{12}      {1}{23}{23}      {12}{13}{23}
               {1}{2}{3}  {1}{1}{23}    {2}{13}{23}      {3}{23}{123}
                          {1}{3}{23}    {3}{3}{123}      {1}{1}{1}{234}
                          {1}{2}{3}{4}  {1}{2}{2}{34}    {1}{1}{24}{34}
                                        {1}{2}{4}{34}    {1}{2}{34}{34}
                                        {1}{2}{3}{4}{5}  {1}{3}{24}{34}
                                                         {1}{4}{4}{234}
                                                         {2}{4}{12}{34}
                                                         {3}{4}{12}{34}
                                                         {1}{2}{3}{3}{45}
                                                         {1}{2}{3}{5}{45}
                                                         {1}{2}{3}{4}{5}{6}
		

Crossrefs

A321733 Number of (0,1)-matrices with n ones, no zero rows or columns, and the same row sums as column sums.

Original entry on oeis.org

1, 1, 2, 8, 40, 246, 1816, 15630, 153592, 1696760, 20816358, 280807868, 4131117440, 65823490088, 1129256780408
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Examples

			The a(4) = 40 matrices:
  [1 1]
  [1 1]
.
  [1 1 0][1 1 0][1 0 1][1 0 1][1 0 0]
  [1 0 0][0 0 1][1 0 0][0 1 0][0 1 1]
  [0 0 1][1 0 0][0 1 0][1 0 0][0 1 0]
.
  [1 0 0][0 1 1][0 1 0][0 1 0][0 1 0]
  [0 0 1][1 0 0][1 1 0][1 0 1][0 1 1]
  [0 1 1][1 0 0][0 0 1][0 1 0][1 0 0]
.
  [0 1 0][0 0 1][0 0 1][0 0 1][0 0 1]
  [0 0 1][1 1 0][1 0 0][0 1 0][0 0 1]
  [1 0 1][0 1 0][0 1 1][1 0 1][1 1 0]
.
  [1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0]
  [0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
  [0 0 1 0][0 0 0 1][0 1 0 0][0 0 0 1][0 1 0 0][0 0 1 0]
  [0 0 0 1][0 0 1 0][0 0 0 1][0 1 0 0][0 0 1 0][0 1 0 0]
.
  [0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0]
  [1 0 0 0][1 0 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
  [0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 0 1 0]
  [0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 0 1 0][1 0 0 0]
.
  [0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0]
  [1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 0 1][0 0 0 1]
  [0 1 0 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0]
  [0 0 0 1][0 1 0 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0]
.
  [0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1]
  [1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0]
  [0 1 0 0][0 0 1 0][1 0 0 0][0 0 1 0][1 0 0 0][0 1 0 0]
  [0 0 1 0][0 1 0 0][0 0 1 0][1 0 0 0][0 1 0 0][1 0 0 0]
		

Crossrefs

Programs

  • Mathematica
    prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
    multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],Total/@prs2mat[#]==Total/@Transpose[prs2mat[#]]]&]],{n,5}]

Extensions

a(7)-a(14) from Lars Blomberg, May 23 2019
Showing 1-6 of 6 results.