cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A224344 #40 Aug 06 2019 18:23:26
%S A224344 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,
%T A224344 66,9,27,106,186,151,41,1,40,177,340,323,133,11,61,293,608,666,358,61,
%U A224344 1,92,482,1076,1330,867,236,13,142,781,1894,2581,1971,737,85,1
%N 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.
%H A224344 Alois P. Heinz, <a href="/A224344/b224344.txt">Rows n = 0..200, flattened</a>
%F A224344 Sum_{k=1..floor(n/2)} k * T(n,k) = A102291(n).
%e A224344 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].
%e A224344 Triangle T(n,k) begins:
%e A224344    1;
%e A224344    1;
%e A224344    1,   1;
%e A224344    1,   3;
%e A224344    2,   5,   1;
%e A224344    3,   8,   5;
%e A224344    5,  13,  13,   1;
%e A224344    7,  23,  27,   7;
%e A224344   11,  39,  52,  25,   1;
%e A224344   17,  65,  99,  66,   9;
%e A224344   27, 106, 186, 151,  41,  1;
%e A224344   40, 177, 340, 323, 133, 11;
%e A224344   ...
%p A224344 T:= proc(n) option remember; local j; if n=0 then 1
%p A224344       else []; for j to n do zip((x, y)->x+y, %,
%p A224344       [`if`(isprime(j), 0, NULL), T(n-j)], 0) od; %[] fi
%p A224344     end:
%p A224344 seq(T(n), n=0..16);
%t A224344 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_ *)
%Y A224344 Column k=0 gives: A052284.
%Y A224344 Row sums are: A011782.
%Y A224344 Row lengths are: A008619.
%Y A224344 T(floor(n/2)) = A093178(n).
%Y A224344 T(2n,n-1) = A001844(n-1) for n>0.
%Y A224344 Cf. A000040, A000079, A004526, A102291, A121303, A222656.
%K A224344 nonn,tabf
%O A224344 0,6
%A A224344 _Alois P. Heinz_, May 23 2013