A366745 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.
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, 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, 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
Offset: 1
Examples
First 14 rows: 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 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 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 The list L for the partitions of 5 is: [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1]. The list L' of contraconjugates p' and distances d(p,p') are given by: p = [5]; p' = [1,1,1,1,1]; d(p,p') = 8 p = [4,1]; p' = [2,1,1,1]; d(p,p') = 4 p = [3,2]; p' = [2,2,1]; d(p,p') = 2 p = [3,1,1,1]; p' = [3,1,1,1]; d(p,p') = 0 p = [2,2,1]; p' = [3,2]; d(p,p') = 2 p = [2,1,1,1]; p' = [4,1]; d(p,p') = 4 p = [1,1,1,1,1], p' = [5]; d(p,p') = 8; so that the numbers of 0s, 2s, 4s, 6s, 8s are 1, 2, 2, 0, 2, as in row 5.
Programs
-
Mathematica
c[n_] := PartitionsP[n]; p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; r[n_, k_] := r[n, k] = Join[p[n, k], ConstantArray[0, n - Length[p[n, k]]]]; p1[n_, k_] := p1[n, k] = Reverse[IntegerPartitions[n]][[k]]; r1[n_, k_] := r1[n, k] = Join[p1[n, k], ConstantArray[0, n - Length[p1[n, k]]]]; d[u_, v_] := Total[Abs[u - v]]; t[n_] := Flatten[Table[d[r[n, k], r1[n, k]], {k, 1, c[n]}]]; t1 = Table[Count[t[n], m], {n, 1, 16}, {m, 0, 2 n - 1, 2}] TableForm[t1] (* array *) u = Flatten[t1] (*sequence *)
Comments