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.

A368566 a(n) = number of pairs (p,q) of partitions of n such that d(p,q) > o(p,q), where d and o are distance functions; see Comments.

This page as a plain text file.
%I A368566 #6 Jan 20 2024 09:47:01
%S A368566 0,2,6,18,34,48,62,108,166,242,334,512,706,984,1368,1876,2492,3360,
%T A368566 4422,5848,7574,9792,12596,16130,20412,25850
%N A368566 a(n) = number of pairs (p,q) of partitions of n such that d(p,q) > o(p,q), where d and o are distance functions; see Comments.
%C A368566 The definition of d depends on the greedy ordering of the partitions p(i) of n; that is, p(1) >= p(2) >= ... >= p(k), where k = A000041(n); see A366156. The ordinal distance o is defined by o(p(i),p(j)) = |i-j|.
%F A368566 A368564(n) + A368565(n) + a(n) = A001255(n) for n >= 1.
%e A368566 The 5 partitions of 4 are (p(1),p(2),p(3),p(4),p(5)) = (4,21,22,211,1111). The following table shows the 25 pairs d(p(i),q(j)) and o(p(i),q(j)):
%e A368566           |    4   31   22   211  1111
%e A368566 ------------------------------------------------
%e A368566    4 d    |    0    2    4    4    6
%e A368566      o    |    0    1    2    3    4
%e A368566   31 d    |    2    0    2    2    4
%e A368566      o    |    1    0    1    2    3
%e A368566   22 d    |    4    2    0    2    4
%e A368566      o    |    2    1    0    1    2
%e A368566  211 d    |    4    2    2    0    2
%e A368566      o    |    3    2    1    0    1
%e A368566 1111 d    |    6    4    4    2    0
%e A368566      o    |    4    3    2    1    0
%e A368566 The table shows 18 pairs (p,q) for which d(p,q) > o(p,q), so a(4) = 18.
%t A368566 c[n_] := PartitionsP[n];
%t A368566 q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
%t A368566 r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
%t A368566 d[u_, v_] := Total[Abs[u - v]];
%t A368566 p[n_] := Flatten[Table[d[r[n, j], r[n, k]] - Abs[j - k], {j, 1, c[n]}, {k, 1, c[n]}]];
%t A368566 Table[Count[p[n], 0], {n, 1, 16}]  (* A368565  *)
%t A368566 Table[Length[Select[p[n], Sign[#] == -1 &]], {n, 1,16}]  (* A368566 *)
%t A368566 Table[Length[Select[p[n], Sign[#] == 1 &]], {n, 1, 16}]  (* A368567 *)
%Y A368566 Cf. A000041, A001255, A366156, A368564, A368565.
%K A368566 nonn,more
%O A368566 1,2
%A A368566 _Clark Kimberling_, Dec 31 2023