[go: up one dir, main page]

login
Search: a299730 -id:a299730
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of partitions of 3*n that have exactly n prime parts.
+10
2
1, 2, 3, 5, 8, 12, 18, 25, 35, 50, 69, 93, 126, 167, 220, 290, 377, 486, 627, 800, 1017, 1290, 1623, 2032, 2542, 3161, 3917, 4843, 5960, 7312, 8957, 10925, 13291, 16139, 19534, 23588, 28437, 34180, 41000, 49099, 58657, 69941, 83269, 98917, 117314, 138930
OFFSET
0,2
LINKS
J. Kelleher, B. O'Sullivan, Generating All Partitions: A Comparison Of Two Encodings, arXiv:0909.2331 [cs.DS], 2009, 2014.
J. Stauduhar, Python program
FORMULA
a(n) = A222656(3*n,n).
EXAMPLE
For n = 3: the five partitions of 3 * 3 = 9 that have exactly three prime parts are (5, 2, 2), (3, 3, 3), (3, 3, 2, 1), (3, 2, 2, 1, 1), and (2, 2, 2, 1, 1, 1), so a(3) = 5.
MATHEMATICA
zip[f_, x_, y_, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[ PadRight[x, m, z], PadRight[y, m, z]]]];
b[n_, i_] := b[n, i] = Module[{j, pc}, Which[n == 0, {1}, i < 1, {0}, True, pc = {}; For[j = 0, j <= n/i, j++, pc = zip[Plus, pc, Join[If[PrimeQ[i], Array[0 &, j], {}], b[n - i*j, i - 1]], 0]]; pc]];
a[n_] := b[3 n, 3 n][[n + 1]];
Table[a[n], {n, 0, 45}] (* Jean-François Alcover, Mar 16 2018, after Alois P. Heinz *)
PROG
(Python) See Stauduhar link.
(PARI) a(n) = {my(nb = 0); forpart(p=3*n, if (sum(k=1, #p, isprime(p[k])) == n, nb++); ); nb; } \\ Michel Marcus, Mar 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Stauduhar, Feb 18 2018
STATUS
approved
a(n) has exactly (a(n) - n) / 2 partitions with exactly (a(n) - n) / 2 prime parts.
+10
2
2, 5, 8, 13, 20, 29, 42, 57, 78, 109, 148, 197, 264, 347, 454, 595, 770, 989, 1272, 1619, 2054, 2601, 3268, 4087, 5108, 6347, 7860, 9713, 11948, 14653, 17944, 21881, 26614, 32311, 39102, 47211, 56910, 68397, 82038, 98237, 117354, 139923, 166580, 197877, 234672
OFFSET
0,1
COMMENTS
If B={b(n)} is the complement of A299731 then no number exists that has exactly b(n) partitions that have exactly b(n) prime parts, so this sequence lists only those numbers that can have the equality property.
Up to a(44) = 234672 (currently, the last term), except for 2,5,8, and 29, every term is the sum of distinct previous terms. Will this be true for all new terms?
FORMULA
a(n) = 2*A299731(n) + n = 2*A222656(3*n,n) + n.
EXAMPLE
For n = 3: A299731(3) = 5. a(3) = 2*5 + 3 = 13. The five partitions of 13 that have exactly five prime parts are: (5,2,2,2,2), (3,3,3,2,2), (3,3,2,2,2,1), (3,2,2,2,2,1,1), and (2,2,2,2,2,1,1,1), so a(3) = 13.
PROG
(Python) # See Stauduhar link.
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Stauduhar, Feb 18 2018
STATUS
approved

Search completed in 0.004 seconds