login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224344 Number T(n,k) of compositions of n using exactly k primes (counted with multiplicity); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows. 6
1, 1, 1, 1, 1, 3, 2, 5, 1, 3, 8, 5, 5, 13, 13, 1, 7, 23, 27, 7, 11, 39, 52, 25, 1, 17, 65, 99, 66, 9, 27, 106, 186, 151, 41, 1, 40, 177, 340, 323, 133, 11, 61, 293, 608, 666, 358, 61, 1, 92, 482, 1076, 1330, 867, 236, 13, 142, 781, 1894, 2581, 1971, 737, 85, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Alois P. Heinz, Rows n = 0..200, flattened

FORMULA

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

EXAMPLE

A(5,1) = 8: [2,1,1,1], [1,2,1,1], [1,1,2,1], [1,1,1,2], [3,1,1], [1,3,1], [1,1,3], [5].

Triangle T(n,k) begins:

   1;

   1;

   1,   1;

   1,   3;

   2,   5,   1;

   3,   8,   5;

   5,  13,  13,   1;

   7,  23,  27,   7;

  11,  39,  52,  25,   1;

  17,  65,  99,  66,   9;

  27, 106, 186, 151,  41,  1;

  40, 177, 340, 323, 133, 11;

  ...

MAPLE

T:= proc(n) option remember; local j; if n=0 then 1

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

      [`if`(isprime(j), 0, NULL), T(n-j)], 0) od; %[] fi

    end:

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]]]]; T[n_] := T[n] =  Module[{j, pc}, If[n == 0, {1}, pc = {}; For[j = 1, j <= n, j++, pc = zip[Plus, pc, Join[If[PrimeQ[j], {0}, {}], T[n-j]], 0]]; pc]]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-Fran├žois Alcover, Jan 29 2014, after Alois P. Heinz *)

CROSSREFS

Column k=0 gives: A052284.

Row sums are: A011782.

Row lengths are: A008619.

T(floor(n/2)) = A093178(n).

T(2n,n-1) = A001844(n-1) for n>0.

Cf. A000040, A000079, A004526, A102291, A121303, A222656.

Sequence in context: A121490 A197293 A099643 * A113260 A051543 A265574

Adjacent sequences:  A224341 A224342 A224343 * A224345 A224346 A224347

KEYWORD

nonn,tabf

AUTHOR

Alois P. Heinz, May 23 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 14:25 EDT 2021. Contains 347607 sequences. (Running on oeis4.)