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 A219198 #18 Apr 26 2025 08:28:13 %S A219198 1,0,0,0,1,0,2,0,2,1,2,1,3,0,3,2,4,2,4,2,5,4,5,4,6,4,6,6,6,6,6,6,9,8, %T A219198 8,10,8,9,11,11,11,13,10,14,13,16,13,18,12,19,14,21,15,22,13,25,18,26, %U A219198 17,29,14,31,21,32,19,35,17,39,25,38,20,43,21,48,26 %N A219198 Number of partitions of n into 4 distinct primes. %H A219198 Alois P. Heinz, <a href="/A219198/b219198.txt">Table of n, a(n) for n = 17..10000</a> %F A219198 G.f.: Sum_{0<i_1<i_2<i_3<i_4} x^(Sum_{j=1..4} prime(i_j)). %F A219198 a(n) = [x^n*y^4] Product_{i>=1} (1+x^prime(i)*y). %p A219198 b:= proc(n, i) option remember; `if`(n=0, [1,0$4], `if`(i<1, [0$5], %p A219198 zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$4], %p A219198 b(n-ithprime(i), i-1)[1..4])[]], 0))) %p A219198 end: %p A219198 a:= n-> b(n, numtheory[pi](n))[5]: %p A219198 seq(a(n), n=17..100); %t A219198 k = 4; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1], Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 17, 100}] (* _Jean-François Alcover_, Jan 30 2014, after _Alois P. Heinz_ *) %t A219198 Table[Length@Select[IntegerPartitions[k,{4}, Prime@Range@100], #[[1]] > #[[2]] > #[[3]] > #[[4]] &], {k, 17, 100}] (* _Robert Price_, Apr 25 2025 *) %Y A219198 Column k=4 of A219180. %K A219198 nonn %O A219198 17,7 %A A219198 _Alois P. Heinz_, Nov 14 2012