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.
%I A366745 #10 Nov 12 2023 22:00:53 %S A366745 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 A366745 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 A366745 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 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. %C A366745 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 A366745 First 14 rows: %e A366745 1 %e A366745 0 2 %e A366745 1 0 2 %e A366745 1 2 0 2 %e A366745 1 2 2 0 2 %e A366745 1 0 6 2 0 2 %e A366745 1 2 2 6 2 0 2 %e A366745 0 6 2 4 6 2 0 2 %e A366745 0 2 4 8 6 6 2 0 2 %e A366745 0 4 8 8 8 4 6 2 0 2 %e A366745 0 6 10 8 12 6 4 6 2 0 2 %e A366745 1 4 14 8 16 10 6 6 8 2 0 2 %e A366745 1 4 18 10 14 20 10 6 6 8 2 0 2 %e A366745 1 8 8 18 20 22 16 16 6 8 8 2 0 2 %e A366745 The list L for the partitions of 5 is: %e A366745 [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1]. %e A366745 The list L' of contraconjugates p' and distances d(p,p') are given by: %e A366745 p = [5]; p' = [1,1,1,1,1]; d(p,p') = 8 %e A366745 p = [4,1]; p' = [2,1,1,1]; d(p,p') = 4 %e A366745 p = [3,2]; p' = [2,2,1]; d(p,p') = 2 %e A366745 p = [3,1,1,1]; p' = [3,1,1,1]; d(p,p') = 0 %e A366745 p = [2,2,1]; p' = [3,2]; d(p,p') = 2 %e A366745 p = [2,1,1,1]; p' = [4,1]; d(p,p') = 4 %e A366745 p = [1,1,1,1,1], p' = [5]; d(p,p') = 8; %e A366745 so that the numbers of 0s, 2s, 4s, 6s, 8s are 1, 2, 2, 0, 2, as in row 5. %t A366745 c[n_] := PartitionsP[n]; %t A366745 p[n_, k_] := p[n, k] = IntegerPartitions[n][[k]]; %t A366745 r[n_, k_] := r[n, k] = Join[p[n, k], ConstantArray[0, n - Length[p[n, k]]]]; %t A366745 p1[n_, k_] := p1[n, k] = Reverse[IntegerPartitions[n]][[k]]; %t A366745 r1[n_, k_] := r1[n, k] = Join[p1[n, k], ConstantArray[0, n - Length[p1[n, k]]]]; %t A366745 d[u_, v_] := Total[Abs[u - v]]; %t A366745 t[n_] := Flatten[Table[d[r[n, k], r1[n, k]], {k, 1, c[n]}]]; %t A366745 t1 = Table[Count[t[n], m], {n, 1, 16}, {m, 0, 2 n - 1, 2}] %t A366745 TableForm[t1] (* array *) %t A366745 u = Flatten[t1] (*sequence *) %Y A366745 Cf. A000041, A366156, A366746. %K A366745 nonn,tabl %O A366745 1,3 %A A366745 _Clark Kimberling_, Oct 25 2023