OFFSET
1,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
EXAMPLE
The a(14) = 8 partitions of 43 into a prime number of distinct prime parts: (41,2), (31,7,5), (29,11,3), (23,17,3), (23,13,7), (19,17,7), (19,13,11), (17,11,7,5,3).
MAPLE
h:= proc(n) option remember; `if`(n=0, 0,
`if`(isprime(n), n, h(n-1)))
end:
b:= proc(n, i, c) option remember; `if`(n=0,
`if`(isprime(c), 1, 0), `if`(i<2, 0, b(n, h(i-1), c)+
`if`(i>n, 0, b(n-i, h(min(n-i, i-1)), c+1))))
end:
a:= n-> b(ithprime(n)$2, 0):
seq(a(n), n=1..56); # Alois P. Heinz, May 26 2021
MATHEMATICA
Table[Length[Select[IntegerPartitions[Prime[n]], And[UnsameQ@@#, PrimeQ[Length[#]], And@@PrimeQ/@#]&]], {n, 10}]
(* Second program: *)
h[n_] := h[n] = If[n == 0, 0, If[PrimeQ[n], n, h[n - 1]]];
b[n_, i_, c_] := b[n, i, c] = If[n == 0,
If[PrimeQ[c], 1, 0], If[i < 2, 0, b[n, h[i - 1], c] +
If[i > n, 0, b[n - i, h[Min[n - i, i - 1]], c + 1]]]];
a[n_] := b[Prime[n], Prime[n], 0];
Array[a, 56] (* Jean-François Alcover, Jun 11 2021, after Alois P. Heinz *)
PROG
(PARI) seq(n)={my(p=vector(n, k, prime(k))); my(v=Vec(prod(k=1, n, 1 + x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 25 2018
EXTENSIONS
More terms from Alois P. Heinz, Jun 26 2018
STATUS
approved