login
Triangular array, read by rows: T(n,k) = number of partitions p of n such that d(p, p') = 2k, where p' = contraconjugate of p, and d is the distance function defined in A366156.
2

%I #10 Nov 12 2023 22:00:53

%S 1,0,2,1,0,2,1,2,0,2,1,2,2,0,2,1,0,6,2,0,2,1,2,2,6,2,0,2,0,6,2,4,6,2,

%T 0,2,0,2,4,8,6,6,2,0,2,0,4,8,8,8,4,6,2,0,2,0,6,10,8,12,6,4,6,2,0,2,1,

%U 4,14,8,16,10,6,6,8,2,0,2,1,4,18,10,14,20,10,6,6,8,2,0,2,1,8,8,18,20,22,16,16,6,8,8,2,0,2,0,6,18,28,30,24,16,16,10,8,8,8,2,0,2,1,4,20,28,30,36,16,34,18,16,4,12,8,2,0,2

%N Triangular array, read by rows: T(n,k) = number of partitions p of n such that d(p, p') = 2k, where p' = contraconjugate of p, and d is the distance function defined in A366156.

%C Let RL denote reverse lexicographic. Write each partition p of n in RL order, and then arrange all the partitions of n in RL order, obtaining a list L as in Mathematica's IntegerPartitions[n]. Let L' be the reversal of L. Let p(i) be the i-th partition in L and let p'(i) be the i-th in L'; then p'(i) is introduced here as the contraconjugate of p(i) . (Note that RL order could be called "greedy" order, because the result of applying the greedy algorithm to p is the same as for RL, and likewise for arranging the partitions in RL order. For a discussion of various orderings, see A080577.)

%e First 14 rows:

%e 1

%e 0 2

%e 1 0 2

%e 1 2 0 2

%e 1 2 2 0 2

%e 1 0 6 2 0 2

%e 1 2 2 6 2 0 2

%e 0 6 2 4 6 2 0 2

%e 0 2 4 8 6 6 2 0 2

%e 0 4 8 8 8 4 6 2 0 2

%e 0 6 10 8 12 6 4 6 2 0 2

%e 1 4 14 8 16 10 6 6 8 2 0 2

%e 1 4 18 10 14 20 10 6 6 8 2 0 2

%e 1 8 8 18 20 22 16 16 6 8 8 2 0 2

%e The list L for the partitions of 5 is:

%e [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1].

%e The list L' of contraconjugates p' and distances d(p,p') are given by:

%e p = [5]; p' = [1,1,1,1,1]; d(p,p') = 8

%e p = [4,1]; p' = [2,1,1,1]; d(p,p') = 4

%e p = [3,2]; p' = [2,2,1]; d(p,p') = 2

%e p = [3,1,1,1]; p' = [3,1,1,1]; d(p,p') = 0

%e p = [2,2,1]; p' = [3,2]; d(p,p') = 2

%e p = [2,1,1,1]; p' = [4,1]; d(p,p') = 4

%e p = [1,1,1,1,1], p' = [5]; d(p,p') = 8;

%e so that the numbers of 0s, 2s, 4s, 6s, 8s are 1, 2, 2, 0, 2, as in row 5.

%t c[n_] := PartitionsP[n];

%t p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]];

%t r[n_, k_] := r[n, k] = Join[p[n, k], ConstantArray[0, n - Length[p[n, k]]]];

%t p1[n_, k_] := p1[n, k] = Reverse[IntegerPartitions[n]][[k]];

%t r1[n_, k_] := r1[n, k] = Join[p1[n, k], ConstantArray[0, n - Length[p1[n, k]]]];

%t d[u_, v_] := Total[Abs[u - v]];

%t t[n_] := Flatten[Table[d[r[n, k], r1[n, k]], {k, 1, c[n]}]];

%t t1 = Table[Count[t[n], m], {n, 1, 16}, {m, 0, 2 n - 1, 2}]

%t TableForm[t1] (* array *)

%t u = Flatten[t1] (*sequence *)

%Y Cf. A000041, A366156, A366746.

%K nonn,tabl

%O 1,3

%A _Clark Kimberling_, Oct 25 2023