cp's OEIS Frontend

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.

A219202 Number of partitions of n into 8 distinct primes.

This page as a plain text file.
%I A219202 #17 Apr 26 2025 08:28:06
%S A219202 1,0,0,0,1,0,1,0,0,0,2,0,3,0,1,0,3,0,5,0,4,1,5,0,10,0,6,1,10,1,15,1,
%T A219202 10,2,17,2,23,1,17,5,27,4,32,2,30,9,38,7,48,6,43,13,56,10,70,12,62,20,
%U A219202 78,19,98,20,86,31,109,30,128,28,121,49,145,45,170
%N A219202 Number of partitions of n into 8 distinct primes.
%H A219202 Alois P. Heinz, <a href="/A219202/b219202.txt">Table of n, a(n) for n = 77..10000</a>
%F A219202 G.f.: Sum_{0<i_1<i_2<...<i_8} x^(Sum_{j=1..8} prime(i_j)).
%F A219202 a(n) = [x^n*y^8] Product_{i>=1} (1+x^prime(i)*y).
%p A219202 b:= proc(n, i) option remember; `if`(n=0, [1,0$8], `if`(i<1, [0$9],
%p A219202        zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$8],
%p A219202        b(n-ithprime(i), i-1)[1..8])[]], 0)))
%p A219202     end:
%p A219202 a:= n-> b(n, numtheory[pi](n))[9]:
%p A219202 seq(a(n), n=77..150);
%t A219202 k = 8; 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, 77, 150}] (* _Jean-François Alcover_, Jan 30 2014, after _Alois P. Heinz_ *)
%t A219202 Table[Length@Select[IntegerPartitions[k,{8}, Prime@Range@100], #[[1]] > #[[2]] > #[[3]] > #[[4]] > #[[5]] > #[[6]] > #[[7]] > #[[8]] &], {k, 77, 150}] (* _Robert Price_, Apr 25 2025 *)
%Y A219202 Column k=8 of A219180.
%K A219202 nonn
%O A219202 77,11
%A A219202 _Alois P. Heinz_, Nov 14 2012