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.
%I A299731 #30 Mar 24 2018 06:08:37 %S A299731 1,2,3,5,8,12,18,25,35,50,69,93,126,167,220,290,377,486,627,800,1017, %T A299731 1290,1623,2032,2542,3161,3917,4843,5960,7312,8957,10925,13291,16139, %U A299731 19534,23588,28437,34180,41000,49099,58657,69941,83269,98917,117314,138930 %N A299731 Number of partitions of 3*n that have exactly n prime parts. %H A299731 Alois P. Heinz, <a href="/A299731/b299731.txt">Table of n, a(n) for n = 0..2000</a> %H A299731 J. Kelleher, B. O'Sullivan, <a href="https://arxiv.org/abs/0909.2331">Generating All Partitions: A Comparison Of Two Encodings</a>, arXiv:0909.2331 [cs.DS], 2009, 2014. %H A299731 J. Stauduhar, <a href="/A299731/a299731.py.txt">Python program</a> %F A299731 a(n) = A222656(3*n,n). %e A299731 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. %t A299731 zip[f_, x_, y_, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[ PadRight[x, m, z], PadRight[y, m, z]]]]; %t A299731 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]]; %t A299731 a[n_] := b[3 n, 3 n][[n + 1]]; %t A299731 Table[a[n], {n, 0, 45}] (* _Jean-François Alcover_, Mar 16 2018, after _Alois P. Heinz_ *) %o A299731 (Python) See Stauduhar link. %o A299731 (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 %Y A299731 Cf. A222656, A299730, A299732. %K A299731 nonn %O A299731 0,2 %A A299731 _J. Stauduhar_, Feb 18 2018