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.

A323523 Number of positive integer square matrices with entries summing to n and equal row and column sums.

This page as a plain text file.
%I A323523 #19 Apr 11 2020 17:25:41
%S A323523 1,1,1,1,2,1,3,1,4,2,5,1,12,1,7,22,9,1,64,1,34,121,11,1,525,2,13,407,
%T A323523 2022,1,801,1,10163,1036,17,6211,41735,1,19,2212,285784,1,3822,1,
%U A323523 381446,2229142,23,1,1189540,2,22069276,7261,2309410,1,20943183,164176641
%N A323523 Number of positive integer square matrices with entries summing to n and equal row and column sums.
%C A323523 Also the number of non-normal semi-magic squares with positive integer entries summing to n.
%H A323523 Andrew Howroyd, <a href="/A323523/b323523.txt">Table of n, a(n) for n = 0..200</a> (terms 0..59 from Chai Wah Wu)
%F A323523 a(p) = 1 and a(p^2) = 2 for p prime (see comment in A323349). - _Chai Wah Wu_, Jan 20 2019
%F A323523 a(n) = Sum_{d|n, d<=n/d} A257493(d, n/d-d) for n > 0. - _Andrew Howroyd_, Apr 10 2020
%e A323523 The a(12) = 12 matrices:
%e A323523   [12]
%e A323523 .
%e A323523   [1 5] [5 1] [2 4] [4 2] [3 3]
%e A323523   [5 1] [1 5] [4 2] [2 4] [3 3]
%e A323523 .
%e A323523   [1 1 2] [1 1 2] [1 2 1] [1 2 1] [2 1 1] [2 1 1]
%e A323523   [1 2 1] [2 1 1] [1 1 2] [2 1 1] [1 1 2] [1 2 1]
%e A323523   [2 1 1] [1 2 1] [2 1 1] [1 1 2] [1 2 1] [1 1 2]
%t A323523 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A323523 facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
%t A323523 ptnsqrs[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),And[SameQ@@Length/@#,Length[#]==0||Length[#]==Length[First[#]]]&];
%t A323523 Table[Sum[Length[Select[ptnsqrs[Times@@Prime/@y],And[SameQ@@Total/@#,SameQ@@Total/@Transpose[#]]&]],{y,IntegerPartitions[n]}],{n,10}]
%Y A323523 Cf. A000290, A006052, A007016, A103198, A120732, A257493, A321719, A321722, A323349, A323523, A323524, A323529.
%K A323523 nonn
%O A323523 0,5
%A A323523 _Gus Wiseman_, Jan 17 2019
%E A323523 a(16)-a(55) from _Chai Wah Wu_, Jan 20 2019