login
Number of partitions of n into distinct parts that are primes or squares of primes.
3

%I #9 Dec 27 2016 02:47:57

%S 1,0,1,1,1,2,1,3,1,4,2,4,4,4,6,4,8,5,9,7,10,9,11,12,12,15,14,17,17,20,

%T 20,23,24,26,28,30,32,35,36,40,41,46,47,52,54,58,62,65,71,73,80,82,90,

%U 93,101,104,113,117,125,132,139,148,154,165,171,183,191

%N Number of partitions of n into distinct parts that are primes or squares of primes.

%F G.f.: Product_{k>=1} (1 + x^prime(k))*(1 + x^(prime(k)^2)). - _Ilya Gutkovskiy_, Dec 26 2016

%e G.f. = 1 + x^2 + x^3 + x^4 + 2*x^5 + x^6 + 3*x^7 + x^8 + 4*x^9 + 2*x^10 + ...

%e a(12) = #{3^2+3, 7+5, 7+3+2, 5+2^2+3} = 4.

%o (PARI) {a(n) = if(n < 0, 0, polcoeff( prod(k=1, primepi(n), (1 + x^prime(k)^2 + x*O(x^n)) * (1 + x^prime(k))), n))}; /* _Michael Somos_, Dec 26 2016 */

%Y Cf. A000586, A111900, A106244, A111901.

%K nonn

%O 1,6

%A _Reinhard Zumkeller_, Aug 20 2005