A368565
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.
Original entry on oeis.org
0, 0, 0, 0, 0, 30, 106, 316, 652, 1388, 2618, 5170, 9164, 16790, 29046, 50714, 84732, 143588, 234048, 385210, 617050, 990868, 1558310, 2459300, 3806838, 5900184
Offset: 1
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)):
| 4 31 22 211 1111
------------------------------------------------
4 d | 0 2 4 4 6
o | 0 1 2 3 4
31 d | 2 0 2 2 4
o | 1 0 1 2 3
22 d | 4 2 0 2 4
o | 2 1 0 1 2
211 d | 4 2 2 0 2
o | 3 2 1 0 1
1111 d | 6 4 4 2 0
o | 4 3 2 1 0
The table shows 0 pairs (p,q) for which d(p,q) < o(p,q), so a(4) = 0.
-
c[n_] := PartitionsP[n];
q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
d[u_, v_] := Total[Abs[u - v]];
p[n_] := Flatten[Table[d[r[n, j], r[n, k]] - Abs[j - k], {j, 1, c[n]}, {k, 1, c[n]}]];
Table[Count[p[n], 0], {n, 1, 16}] (* A368565 *)
Table[Length[Select[p[n], Sign[#] == -1 &]], {n, 1,16}] (* A368566 *)
Table[Length[Select[p[n], Sign[#] == 1 &]], {n, 1, 16}] (* A368567 *)
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.
Original entry on oeis.org
0, 2, 6, 18, 34, 48, 62, 108, 166, 242, 334, 512, 706, 984, 1368, 1876, 2492, 3360, 4422, 5848, 7574, 9792, 12596, 16130, 20412, 25850
Offset: 1
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)):
| 4 31 22 211 1111
------------------------------------------------
4 d | 0 2 4 4 6
o | 0 1 2 3 4
31 d | 2 0 2 2 4
o | 1 0 1 2 3
22 d | 4 2 0 2 4
o | 2 1 0 1 2
211 d | 4 2 2 0 2
o | 3 2 1 0 1
1111 d | 6 4 4 2 0
o | 4 3 2 1 0
The table shows 18 pairs (p,q) for which d(p,q) > o(p,q), so a(4) = 18.
-
c[n_] := PartitionsP[n];
q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
d[u_, v_] := Total[Abs[u - v]];
p[n_] := Flatten[Table[d[r[n, j], r[n, k]] - Abs[j - k], {j, 1, c[n]}, {k, 1, c[n]}]];
Table[Count[p[n], 0], {n, 1, 16}] (* A368565 *)
Table[Length[Select[p[n], Sign[#] == -1 &]], {n, 1,16}] (* A368566 *)
Table[Length[Select[p[n], Sign[#] == 1 &]], {n, 1, 16}] (* A368567 *)
A368564
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.
Original entry on oeis.org
1, 2, 3, 7, 15, 43, 57, 60, 82, 134, 184, 247, 331, 451, 562, 771, 985, 1277, 1630, 2071, 2640, 3344, 4119, 5195, 6514, 8062
Offset: 1
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)):
| 4 31 22 211 1111
------------------------------------------------
4 d | 0 2 4 4 6
o | 0 1 2 3 4
31 d | 2 0 2 2 4
o | 1 0 1 2 3
22 d | 4 2 0 2 4
o | 2 1 0 1 2
211 d | 4 2 2 0 2
o | 3 2 1 0 1
1111 d | 6 4 4 2 0
o | 4 3 2 1 0
The table shows 7 pairs (p,q) for which d(p,q) = o(p,q), so a(4) = 7.
-
c[n_] := PartitionsP[n];
q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
d[u_, v_] := Total[Abs[u - v]];
p[n_] := Flatten[Table[d[r[n, j], r[n, k]] - Abs[j - k], {j, 1, c[n]}, {k, 1, c[n]}]];
Table[Count[p[n], 0], {n, 1, 16}] (* A368565 *)
Table[Length[Select[p[n], Sign[#] == -1 &]], {n, 1,16}] (* A368566 *)
Table[Length[Select[p[n], Sign[#] == 1 &]], {n, 1, 16}] (* A368567 *)
Showing 1-3 of 3 results.
Comments