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!)
A222656 Number T(n,k) of partitions of n using exactly k primes; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows. 8
1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 4, 3, 1, 3, 6, 4, 2, 5, 7, 6, 3, 1, 6, 9, 8, 5, 2, 8, 11, 12, 7, 3, 1, 8, 17, 14, 10, 5, 2, 12, 20, 19, 14, 8, 3, 1, 13, 26, 25, 19, 11, 5, 2, 17, 31, 35, 24, 16, 8, 3, 1, 19, 41, 42, 34, 21, 12, 5, 2, 26, 47, 56, 44, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
FORMULA
Sum_{k=1..floor(n/2)} k * T(n,k) = A037032(n).
G.f.: G(t,x) = Product_{i>=1} (1 - x^prime(i))/((1 - x^i)*(1 - t*x^prime(i))). - Emeric Deutsch, Nov 11 2015
EXAMPLE
T(6,0) = 3: [6], [4,1,1], [1,1,1,1,1,1].
T(6,1) = 4: [5,1], [4,2], [3,1,1,1], [2,1,1,1,1].
T(6,2) = 3: [3,3], [3,2,1], [2,2,1,1].
T(6,3) = 1: [2,2,2].
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 2;
2, 2, 1;
2, 3, 2;
3, 4, 3, 1;
3, 6, 4, 2;
5, 7, 6, 3, 1;
6, 9, 8, 5, 2;
8, 11, 12, 7, 3, 1;
8, 17, 14, 10, 5, 2;
...
MAPLE
b:= proc(n, i) option remember; local j; if n=0 then 1 elif i<1 then 0
else []; for j from 0 to n/i do zip((x, y)->x+y, %,
[`if`(isprime(i), 0$j, NULL), b(n-i*j, i-1)], 0) od; %[] fi
end:
T:= n-> b(n$2):
seq(T(n), n=0..16);
MATHEMATICA
zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; b[n_, i_] := b[n, i] = Module[{j, pc}, Which[n == 0, {1}, i<1, {0}, True, pc = {}; For[j = 0, j <= n/i, j++, pc = zip[Plus, pc, Join[If[PrimeQ[i], Array[0&, j], {}], b[n-i*j, i-1]], 0]]; pc]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
CROSSREFS
Column k=0 gives: A002095.
Row sums give: A000041.
Sequence in context: A000177 A319815 A373092 * A162545 A162544 A209323
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 29 2013
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 June 22 11:42 EDT 2024. Contains 373570 sequences. (Running on oeis4.)