login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #19 Feb 13 2021 07:57:20

%S 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,

%T 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,

%U 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

%N 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).

%C Row n has floor(n/2) terms.

%C Sum of terms in row n = A023360(n).

%C T(n,1) = A010051(n) (characteristic function of primes); T(n,2) = A073610(n); T(n,3) = A098238(n).

%C Sum_{k=1..floor(n/2)} k*T(n,k) = A121304(n).

%H Alois P. Heinz, <a href="/A121303/b121303.txt">Rows n = 2..200, flattened</a>

%F G.f.: 1/(1 - t*Sum_{i>=1} z^prime(i)).

%e T(9,3) = 4 because we have [2,2,5], [2,5,2], [5,2,2] and [3,3,3].

%e Triangle starts:

%e 1;

%e 1;

%e 0, 1;

%e 1, 2;

%e 0, 1, 1;

%e 1, 2, 3;

%e 0, 2, 3, 1;

%e 0, 2, 4, 4;

%e ...

%p 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

%p # second Maple program:

%p with(numtheory):

%p b:= proc(n) option remember; local j; if n=0 then [1]

%p else []; for j to pi(n) do zip((x, y)->x+y, %,

%p [0, b(n-ithprime(j))[]], 0) od; % fi

%p end:

%p T:= n-> subsop(1=NULL, b(n))[]:

%p seq(T(n), n=2..20); # _Alois P. Heinz_, May 23 2013

%t 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 *)

%Y Cf. A010051, A023360, A073610, A098238, A121304, A224344.

%Y T(n^2,n) gives A341459.

%K nonn,tabf

%O 2,6

%A _Emeric Deutsch_, Aug 06 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)