OFFSET
2,1
COMMENTS
A table of partitions of n into distinct prime parts in graded reverse lexicographic ordering.
EXAMPLE
r n \ k 1 2 3 4 5
-----------------------------------
1 2 [ 2];
2 3 [ 3];
3 5 [ 5], [3, 2];
4 7 [ 7], [5, 2];
5 8 [ 5, 3];
6 9 [ 7, 2];
7 10 [ 7, 3], [5, 3, 2];
8 11 [11];
9 12 [ 7, 5], [7, 3, 2];
...
For n = 10 we can see that 10 is the 7th number having partitions into distinct primes so the 7th row of the triangle lists the two partitions that are the two ways to write 10 as a sum of distinct primes: 7 + 3 and 5 + 3 + 2.
PROG
(Python)
from sympy.utilities.iterables import partitions
from sympy import isprime
res = []
for n in range(22):
for p in partitions(n):
for i, f in p.items():
if not isprime(i) or f>1:
break
else:
res.extend(list(p.keys()))
print(res)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Jens Ahlström, Jul 07 2025
STATUS
approved
