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.

A366156 Triangular array read by rows: T(n,k) = number of pairs u,v of partitions of n such that d(u,v) = 2k, where d is the distance function defined in Comments.

This page as a plain text file.
%I A366156 #18 Oct 16 2023 16:11:19
%S A366156 1,2,1,5,4,1,9,7,4,1,17,20,11,6,1,28,35,22,13,6,1,47,70,53,35,17,8,1,
%T A366156 73,119,104,68,41,21,8,1,114,211,197,158,87,58,25,10,1,170,337,349,
%U A366156 282,185,111,66,29,10,1,253,555,626,560,385,267,143,89,35,12,1
%N A366156 Triangular array read by rows: T(n,k) = number of pairs u,v of partitions of n such that d(u,v) = 2k, where d is the distance function defined in Comments.
%C A366156 Suppose that p = [p(1),...,p(i)] and q = [q(1),...,q(j)] are partitions of n, where p(1) >= ... >= p(i) and q(1) >= ... >= q(j). If i = n, let p_ = p, else p_ = [p(1),...,p(i),0,...,0], where the number of 0' s appended is n-i. If j = n, let q_ = q, else q_ = [q(1),...,q(j),0,...,0], where the number of 0's appended is n-j. Write p_ = [p(1),...,p(i),p(i+1),...,p(n)] and q_ = [q(1),...,q(j),q(j+1),...,q(n)]. The distance between p and q is defined by d(p,q) = |p(1) - q(1)| + ... + |p(n) - q(n)|.
%e A366156 Write the 5 partitions of 4 as 4, 31, 22, 211, 111, and represent them as a,b,c,d,e in the following tableaux:
%e A366156  a : 4 0 0 0  | 2 4 4 6
%e A366156  b : 3 1 0 0  | 2 2 4
%e A366156  c : 2 2 0 0  | 2 4
%e A366156  d : 2 1 1 0  | 2
%e A366156  e : 1 1 1 1
%e A366156 where, for example, the distances 2 4 4 6 are given by
%e A366156  d(a,b) = |4-3| + |0-1| + |0-0| + |0-0| = 2
%e A366156  d(a,c) = |4-2| + |0-2| + |0-0| + |0-0| = 4
%e A366156  d(a,d) = |4-2| + |0-1| + |0-1| + |0-0| = 4
%e A366156  d(a,e) = |4-1| + |0-1| + |0-1| + |0-1| = 6
%e A366156 First eight rows:
%e A366156    1
%e A366156    2     1
%e A366156    5     4     1
%e A366156    9     7     4    1
%e A366156   17    20    11    6    1
%e A366156   28    35    22   13    6    1
%e A366156   47    70    53   35   17    8   1
%e A366156   73   119   104   68   41   21   8   1
%e A366156   ...
%t A366156 c[n_] := PartitionsP[n];
%t A366156 q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
%t A366156 r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
%t A366156 d[u_, v_] := Total[Abs[u - v]];
%t A366156 t[n_] := Flatten[Table[d[r[n, j], r[n, k]], {j, 1, -1 + c[n]}, {k, j + 1, c[n]}]];
%t A366156 t1 = Table[Count[t[n], m], {n, 2, 17}, {m, 2, 2 n - 2, 2}]
%t A366156 TableForm[t1] (* this sequence as an array *)
%t A366156 u = Flatten[t1]  (* this sequence *)
%Y A366156 Cf. A000041, A000097 (column 1), A230025 (see Comment), A355389 (row sums).
%K A366156 nonn,tabl
%O A366156 2,2
%A A366156 _Clark Kimberling_, Oct 03 2023