OFFSET
0,12
LINKS
Alois P. Heinz, Rows n = 0..1000, flattened
FORMULA
T(n,pi(n)) = A010051(n) for n > 1.
T(p,pi(p)) = 1 if p is prime.
T(prime(k),k) = 1 for k >= 1.
Recursion: T(n,k) = Sum_{q=k..pi(n-p)} T(n-p, q) with p := prime(k) and T(n,k) = 0 if n < p, or 1 if n = p. - David James Sycamore, Mar 28 2020
EXAMPLE
In the A000607(11) = 6 partitions of 11 into prime parts, (11), 335, 227, 2225, 2333, 22223 the least parts are 11 = prime(5) (once), 3 = prime(2)(once), and 2 = prime(1) (four times), whereas 5 and 7 (prime(3) and prime(4)) do not occur. Thus row 11 is [4,1,0,0,1].
Triangle T(n,k) begins:
0 ;
0 ;
1 ;
0, 1 ;
1 ;
1, 0, 1 ;
1, 1 ;
2, 0, 0, 1 ;
2, 1 ;
3, 1 ;
3, 1, 1 ;
4, 1, 0, 0, 1 ;
5, 1, 1 ;
6, 2, 0, 0, 0, 1 ;
7, 2, 0, 1 ;
9, 2, 1 ;
10, 3, 1 ;
12, 3, 1, 0, 0, 0, 1 ;
14, 3, 1, 1 ;
17, 4, 1, 0, 0, 0, 0, 1 ;
19, 5, 1, 1 ;
...
MAPLE
b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
end:
T:= proc(n) option remember; (p-> seq(`if`(isprime(i),
coeff(p, x, i), [][]), i=2..max(2, degree(p))))(b(n, 2, x))
end:
seq(T(n), n=0..23);
MATHEMATICA
b[n_, p_, t_] := b[n, p, t] = If[n == 0, 1, If[p > n, 0, With[{q = NextPrime[p]}, Sum[b[n - p*j, q, 1], {j, 1, n/p}]*t^p + b[n, q, t]]]];
T[n_] := If[n < 2, {0}, MapIndexed[If[PrimeQ[#2[[1]]], #1, Nothing]&, Rest @ CoefficientList[b[n, 2, x], x]]];
T /@ Range[0, 23] // Flatten (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Mar 16 2020
STATUS
approved