%I #24 Jan 28 2022 01:24:13
%S 1,2,3,4,5,4,1,6,5,1,7,6,1,5,2,8,7,1,6,2,9,8,1,7,2,6,3,10,9,1,8,2,7,3,
%T 6,4,11,10,1,9,2,8,3,7,4,7,3,1,12,11,1,10,2,9,3,8,4,8,3,1,7,4,1,13,12,
%U 1,11,2,10,3,9,4,9,3,1,8,5,8,4,1,7,5,1
%N Array: row n shows the square partitions of n.
%C Suppose that p is a partition of n. Let m X m be the size of its Ferrers matrix, f(p), defined at A237981. Then f(p) consists of ceiling(m/2) concentric squares, where the innermost square is a single point if m is odd. The square partition of p is introduced here as the partition [x(1), x(2), ..., x(k)], where x(i) is the number of 1s in the i-th concentric square, where the squares are taken in order starting with the outermost.
%H Clark Kimberling, <a href="/A237985/b237985.txt">Table of n, a(n) for n = 1..1000</a>
%H Clark Kimberling and Peter J. C. Moses, <a href="http://faculty.evansville.edu/ck6/GalleryThree/Introduction3.html">Ferrers Matrices and Related Partitions of Integers</a>
%e The 7 square partitions of 12 are as follows: [12], [11,1], [10,2], [9,3], [8,4], [8,3,1], [7,4,1]. The Ferrers matrix of the partition [4,3,3,1,1] of 12 is shown here:
%e ...
%e 1 . 1 . 1 . 1 . 0
%e 1 . 1 . 1 . 0 . 0
%e 1 . 1 . 1 . 0 . 0
%e 1 . 0 . 0 . 0 . 0
%e 1 . 0 . 0 . 0 . 0.
%e The outermost square has 8 1s, the next has 3 1s, and the innermost, 1 1, so that [8,3,1] is a square partition of 12. The first 9 rows of the array:
%e 1
%e 2
%e 3
%e 4
%e 5 4 1
%e 6 5 1
%e 7 6 1 5 2
%e 8 7 1 6 2
%e 9 8 1 7 2 6 3
%t z=20;
%t ferrersMatrix[list_]:=PadRight[Map[Table[1,{#}]&,#],{#,#}&[Max[#,Length[#]]]]&[list];
%t sqPart[list_]:=DeleteCases[Total[{Total[LowerTriangularize[#]+Transpose[UpperTriangularize[#,1]]]&[Reverse[LowerTriangularize[#]]],Reverse[Total[Transpose[LowerTriangularize[#]]+UpperTriangularize[#,1]]]&[Reverse[UpperTriangularize[#,1]]]}&[ferrersMatrix[list]]],0];
%t sqParts[n_]:=#[[Reverse[Ordering[PadRight[#]]]]]&[DeleteDuplicates[Map[sqPart,IntegerPartitions[n]]]]
%t Flatten[sq=Map[sqParts[#]&,Range[z]]] (*A237985*)
%t Map[Length,sq] (*A237980*)
%t (* _Peter J. C. Moses_, Feb 19 2014 *)
%Y Cf. A237980, A237981, A238325.
%K nonn,tabf,easy
%O 1,2
%A _Clark Kimberling_ and _Peter J. C. Moses_, Feb 25 2014