login
A121303
Triangle read by rows: T(n,k) is the number of compositions of n into k primes (i.e., ordered sequences of k primes having sum n; n>=2, k>=1).
17
1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 2, 3, 0, 2, 3, 1, 0, 2, 4, 4, 0, 3, 6, 6, 1, 1, 0, 6, 8, 5, 0, 2, 9, 13, 10, 1, 1, 2, 6, 16, 15, 6, 0, 3, 6, 22, 25, 15, 1, 0, 2, 10, 24, 36, 26, 7, 0, 4, 9, 22, 50, 45, 21, 1, 1, 0, 12, 32, 65, 72, 42, 8, 0, 4, 12, 34, 70, 106, 77, 28, 1, 1, 2, 12, 40, 90, 150
OFFSET
2,6
COMMENTS
Row n has floor(n/2) terms.
Sum of terms in row n = A023360(n).
T(n,1) = A010051(n) (characteristic function of primes); T(n,2) = A073610(n); T(n,3) = A098238(n).
Sum_{k=1..floor(n/2)} k*T(n,k) = A121304(n).
LINKS
FORMULA
G.f.: 1/(1 - t*Sum_{i>=1} z^prime(i)).
EXAMPLE
T(9,3) = 4 because we have [2,2,5], [2,5,2], [5,2,2] and [3,3,3].
Triangle starts:
1;
1;
0, 1;
1, 2;
0, 1, 1;
1, 2, 3;
0, 2, 3, 1;
0, 2, 4, 4;
...
MAPLE
G:=1/(1-t*sum(z^ithprime(i), i=1..30))-1: Gser:=simplify(series(G, z=0, 25)): for n from 2 to 21 do P[n]:=sort(coeff(Gser, z, n)) od: for n from 2 to 21 do seq(coeff(P[n], t, j), j=1..floor(n/2)) od; # yields sequence in triangular form
# second Maple program:
with(numtheory):
b:= proc(n) option remember; local j; if n=0 then [1]
else []; for j to pi(n) do zip((x, y)->x+y, %,
[0, b(n-ithprime(j))[]], 0) od; % fi
end:
T:= n-> subsop(1=NULL, b(n))[]:
seq(T(n), n=2..20); # Alois P. Heinz, May 23 2013
MATHEMATICA
nn=20; a[x_]:=Sum[x^Prime[n], {n, 1, nn}]; CoefficientList[Series[1/(1-y a[x]), {x, 0, nn}], {x, y}]//Grid (* Geoffrey Critzer, Nov 08 2013 *)
CROSSREFS
T(n^2,n) gives A341459.
Sequence in context: A135549 A262666 A124737 * A166396 A152221 A144092
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Aug 06 2006
STATUS
approved