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

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

A321718 Number of coupled non-normal semi-magic rectangles with sum of entries equal to n.

Original entry on oeis.org

1, 1, 5, 9, 44, 123, 986, 5043, 45832, 366300, 3862429, 39916803, 495023832, 6227020803, 88549595295, 1308012377572, 21086922542349, 355687428096003, 6427700493998229, 121645100408832003, 2437658338007783347, 51091307195905020227, 1125098837523651728389, 25852016738884976640003, 620752163206546966698620, 15511210044577707492319496
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

A coupled non-normal semi-magic rectangle is a nonnegative integer matrix with equal row sums and equal column sums. The common row sum may be different from the common column sum.
Rectangles must be of size k X m where k and m are divisors of n. This implies that a(p) = p! + 3 for p prime since the only allowable rectangles are of sizes 1 X 1, 1 X p, p X 1 and p X p. The 1 X 1 square is [p], the 1 X p and p X 1 rectangles are [1,...,1] and its transpose and the p X p squares are necessarily permutation matrices and there are p! permutation matrices of size p X p. Also, a(n) >= n! + 3 for n > 1. - Chai Wah Wu, Jan 15 2019

Examples

			The a(3) = 9 coupled semi-magic rectangles:
  [3] [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[multsubs[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! + 3 for p prime. a(n) >= n! + 3 for n > 1. - Chai Wah Wu, Jan 15 2019

Extensions

a(7)-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

A321722 Number of non-normal magic squares whose entries are nonnegative integers summing to n.

Original entry on oeis.org

1, 1, 1, 1, 10, 21, 97, 657, 5618, 48918, 494530, 5383553, 65112565, 840566081, 11834555867, 176621056393, 2838064404989, 48060623405313
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

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

Examples

			The a(4) = 10 magic squares:
  [4]
.
  [1 1]
  [1 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 0 0 1][0 0 0 1]
  [0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]
  [0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]
  [0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 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@@Join[{Tr[prs2mat[#]],Tr[Reverse[prs2mat[#]]]},Total/@prs2mat[#],Total/@Transpose[prs2mat[#]]]]&]],{n,5}]

Formula

a(p) = A007016(p) + 1 if p is prime. a(n) >= A007016(n) + 1 for n > 1. - Chai Wah Wu, Jan 15 2019

Extensions

a(7)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(17) from Chai Wah Wu, Jan 16 2019

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

A321723 Number of non-normal magic squares whose entries are all 0 or 1 and sum to n.

Original entry on oeis.org

1, 1, 0, 0, 9, 20, 96, 656, 5584, 48913, 494264, 5383552, 65103875, 840566080, 11834159652, 176621049784, 2838040416201, 48060623405312
Offset: 0

Views

Author

Gus Wiseman, Nov 18 2018

Keywords

Comments

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

Examples

			The a(4) = 9 magic squares:
  [1 1]
  [1 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 0 0 1][0 0 0 1]
  [0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]
  [0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]
  [0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 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/@#],SameQ@@Join[{Tr[prs2mat[#]],Tr[Reverse[prs2mat[#]]]},Total/@prs2mat[#],Total/@Transpose[prs2mat[#]]]]&]],{n,5}]

Formula

a(n) >= A007016(n) with equality if n is prime. - Chai Wah Wu, Jan 15 2019

Extensions

a(7)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(17) from Chai Wah Wu, Jan 16 2019

A322785 Number of uniform multiset partitions of uniform multisets of size n whose union is an initial interval of positive integers.

Original entry on oeis.org

1, 1, 4, 4, 12, 4, 48, 4, 183, 297, 1186, 4, 33950, 4, 139527, 1529608, 4726356, 4, 229255536, 4, 3705777010, 36279746314, 13764663019, 4, 14096735197959, 5194673049514, 7907992957755, 2977586461058927, 13426396910491001, 4, 1350012288268171854, 4, 59487352224070807287
Offset: 0

Views

Author

Gus Wiseman, Dec 26 2018

Keywords

Comments

A multiset is uniform if all multiplicities are equal. A multiset partition is uniform if all parts have the same size.

Examples

			The a(1) = 1 though a(6) = 48 multiset partitions:
  {1}  {11}    {111}      {1111}        {11111}          {111111}
       {12}    {123}      {1122}        {12345}          {111222}
       {1}{1}  {1}{1}{1}  {1234}        {1}{1}{1}{1}{1}  {112233}
       {1}{2}  {1}{2}{3}  {11}{11}      {1}{2}{3}{4}{5}  {123456}
                          {11}{22}                       {111}{111}
                          {12}{12}                       {111}{222}
                          {12}{34}                       {112}{122}
                          {13}{24}                       {112}{233}
                          {14}{23}                       {113}{223}
                          {1}{1}{1}{1}                   {122}{133}
                          {1}{1}{2}{2}                   {123}{123}
                          {1}{2}{3}{4}                   {123}{456}
                                                         {124}{356}
                                                         {125}{346}
                                                         {126}{345}
                                                         {134}{256}
                                                         {135}{246}
                                                         {136}{245}
                                                         {145}{236}
                                                         {146}{235}
                                                         {156}{234}
                                                         {11}{11}{11}
                                                         {11}{12}{22}
                                                         {11}{22}{33}
                                                         {11}{23}{23}
                                                         {12}{12}{12}
                                                         {12}{12}{33}
                                                         {12}{13}{23}
                                                         {12}{34}{56}
                                                         {12}{35}{46}
                                                         {12}{36}{45}
                                                         {13}{13}{22}
                                                         {13}{24}{56}
                                                         {13}{25}{46}
                                                         {13}{26}{45}
                                                         {14}{23}{56}
                                                         {14}{25}{36}
                                                         {14}{26}{35}
                                                         {15}{23}{46}
                                                         {15}{24}{36}
                                                         {15}{26}{34}
                                                         {16}{23}{45}
                                                         {16}{24}{35}
                                                         {16}{25}{34}
                                                         {1}{1}{1}{1}{1}{1}
                                                         {1}{1}{1}{2}{2}{2}
                                                         {1}{1}{2}{2}{3}{3}
                                                         {1}{2}{3}{4}{5}{6}
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    Table[Sum[Length[Select[mps[m],SameQ@@Length/@#&]],{m,Table[Join@@Table[Range[n/d],{d}],{d,Divisors[n]}]}],{n,8}]

Formula

a(n) = 4 <=> n in { A000040 }. - Alois P. Heinz, Feb 03 2022

Extensions

More terms from Alois P. Heinz, Jan 30 2019
Terms a(14) and beyond from Andrew Howroyd, Feb 03 2022

A323302 Number of ways to arrange the parts of the integer partition with Heinz number n into a matrix with equal row-sums and equal column-sums.

Original entry on oeis.org

1, 1, 1, 2, 1, 0, 1, 2, 2, 0, 1, 0, 1, 0, 0, 3, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 2, 0, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 4, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2019

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			The a(900) = 12 matrix-arrangements of (3,3,2,2,1,1):
  [1 2 3] [1 3 2] [2 1 3] [2 3 1] [3 1 2] [3 2 1]
  [3 2 1] [3 1 2] [2 3 1] [2 1 3] [1 3 2] [1 2 3]
.
  [1 3] [1 3] [2 2] [2 2] [3 1] [3 1]
  [2 2] [3 1] [1 3] [3 1] [1 3] [2 2]
  [3 1] [2 2] [3 1] [1 3] [2 2] [1 3]
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    Table[Length[Select[ptnmats[n],And[SameQ@@Total/@#,SameQ@@Total/@Transpose[#]]&]],{n,100}]

A321736 Number of non-isomorphic weight-n multiset partitions whose part-sizes are also their vertex-degrees.

Original entry on oeis.org

1, 1, 2, 4, 9, 17, 42, 92, 231, 579, 1577
Offset: 0

Views

Author

Gus Wiseman, Nov 19 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 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(5) = 17 multiset partitions:
  {{1}}  {{1,1}}    {{1,1,1}}      {{1,1,1,1}}        {{1,1,1,1,1}}
         {{1},{2}}  {{1},{2,2}}    {{1,1},{2,2}}      {{1,1},{1,2,2}}
                    {{2},{1,2}}    {{1,2},{1,2}}      {{1,1},{2,2,2}}
                    {{1},{2},{3}}  {{1},{2,2,2}}      {{1,2},{1,2,2}}
                                   {{2},{1,2,2}}      {{1},{2,2,2,2}}
                                   {{1},{1},{2,3}}    {{2},{1,2,2,2}}
                                   {{1},{2},{3,3}}    {{1},{2,2},{3,3}}
                                   {{1},{3},{2,3}}    {{1},{2,3},{2,3}}
                                   {{1},{2},{3},{4}}  {{1},{2},{3,3,3}}
                                                      {{1},{3},{2,3,3}}
                                                      {{2},{1,2},{3,3}}
                                                      {{2},{1,3},{2,3}}
                                                      {{3},{3},{1,2,3}}
                                                      {{1},{2},{2},{3,4}}
                                                      {{1},{2},{3},{4,4}}
                                                      {{1},{2},{4},{3,4}}
                                                      {{1},{2},{3},{4},{5}}
		

Crossrefs

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

Showing 1-10 of 14 results. Next