login
Number of compositions (ordered partitions) of the n-th primorial into distinct parts.
1

%I #23 Apr 14 2022 06:31:41

%S 1,1,11,41867,517934206090276988507,

%T 42635439758725572299058305546953458030363703549127905691758491973278624456679699932948789006991639715987

%N Number of compositions (ordered partitions) of the n-th primorial into distinct parts.

%C All terms are odd.

%H Alois P. Heinz, <a href="/A343119/b343119.txt">Table of n, a(n) for n = 0..6</a>

%F a(n) = A032020(A002110(n)).

%p b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:

%p g:= proc(n, k) option remember; `if`(k<0 or n<0, 0,

%p `if`(k=0, `if`(n=0, 1, 0), g(n-k, k)+k*g(n-k, k-1)))

%p end:

%p a:= n-> add(g(b(n), k), k=0..floor((sqrt(8*b(n)+1)-1)/2)):

%p seq(a(n), n=0..5);

%t $RecursionLimit = 5000;

%t b[n_] := If[n == 0, 1, b[n - 1]*Prime[n]];

%t g[n_, k_] := g[n, k] = If[k < 0 || n < 0, 0,

%t If[k == 0, If[n == 0, 1, 0], g[n - k, k] + k*g[n - k, k - 1]]];

%t a[n_] := Sum[g[b[n], k], {k, 0, Floor[(Sqrt[8*b[n] + 1] - 1)/2]}];

%t Table[a[n], {n, 0, 5}] (* _Jean-François Alcover_, Apr 14 2022, after _Alois P. Heinz_ *)

%Y Cf. A002110, A032020, A000849, A005867, A054640, A058254, A062447, A342996, A343147.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Apr 09 2021