login
A385707
Irregular triangle T(r,k) read by rows in which row r lists the partitions into distinct primes of the r-th number having such partitions, r >= 1, k >= 1.
0
2, 3, 5, 3, 2, 7, 5, 2, 5, 3, 7, 2, 7, 3, 5, 3, 2, 11, 7, 5, 7, 3, 2, 13, 11, 2, 11, 3, 7, 5, 2, 13, 2, 7, 5, 3, 13, 3, 11, 5, 11, 3, 2, 17, 7, 5, 3, 2, 13, 5, 13, 3, 2, 11, 7, 11, 5, 2, 19, 17, 2, 11, 5, 3, 17, 3, 13, 7, 13, 5, 2, 11, 7, 2, 19, 2, 13, 5, 3
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
Sequence in context: A254862 A340641 A322235 * A346477 A337583 A172984
KEYWORD
nonn,tabf
AUTHOR
Jens Ahlström, Jul 07 2025
STATUS
approved