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!)
A117278 Triangle read by rows: T(n,k) is the number of partitions of n into k prime parts (n>=2, 1<=k<=floor(n/2)). 21
1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 0, 2, 1, 3, 2, 1, 1, 0, 1, 3, 2, 3, 2, 1, 0, 2, 2, 3, 3, 2, 1, 1, 1, 0, 4, 3, 3, 3, 2, 1, 0, 2, 2, 4, 3, 4, 2, 1, 1, 1, 1, 3, 4, 5, 3, 3, 2, 1, 0, 2, 2, 6, 4, 4, 4, 2, 1, 1, 0, 1, 5, 3, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,19
COMMENTS
Row n has floor(n/2) terms. Row sums yield A000607. T(n,1) = A010051(n) (the characteristic function of the primes). T(n,2) = A061358(n). Sum(k*T(n,k), k>=1) = A084993(n).
LINKS
FORMULA
G.f.: G(t,x) = -1+1/product(1-tx^(p(j)), j=1..infinity), where p(j) is the j-th prime.
EXAMPLE
T(12,3) = 2 because we have [7,3,2] and [5,5,2].
Triangle starts:
1;
1;
0, 1;
1, 1;
0, 1, 1;
1, 1, 1;
0, 1, 1, 1;
0, 1, 2, 1;
...
MAPLE
g:=1/product(1-t*x^(ithprime(j)), j=1..30): gser:=simplify(series(g, x=0, 30)): for n from 2 to 22 do P[n]:=sort(coeff(gser, x^n)) od: for n from 2 to 22 do seq(coeff(P[n], t^j), j=1..floor(n/2)) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n, i) option remember;
`if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1),
[0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i))[]], 0)))
end:
T:= n-> subsop(1=NULL, b(n, numtheory[pi](n)))[]:
seq(T(n), n=2..25); # Alois P. Heinz, Nov 16 2012
MATHEMATICA
(* As triangle: *) nn=20; a=Product[1/(1-y x^i), {i, Table[Prime[n], {n, 1, nn}]}]; Drop[CoefficientList[Series[a, {x, 0, nn}], {x, y}], 2, 1]//Grid (* Geoffrey Critzer, Oct 30 2012 *)
PROG
(PARI)
parts(n, pred)={prod(k=1, n, if(pred(k), 1/(1-y*x^k) + O(x*x^n), 1))}
{my(n=15); apply(p->Vecrev(p/y), Vec(parts(n, isprime)-1))} \\ Andrew Howroyd, Dec 28 2017
CROSSREFS
Row sums give A000607.
T(A000040(n),n) gives A259254(n).
Sequence in context: A030187 A270657 A270658 * A215556 A140082 A330714
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Mar 07 2006
STATUS
approved

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 27 20:19 EDT 2024. Contains 372020 sequences. (Running on oeis4.)