login
Number of partitions of n into 9 nonprime parts.
10

%I #12 Feb 23 2022 06:48:25

%S 1,0,0,1,0,1,1,1,2,2,2,3,3,4,6,6,7,9,10,12,15,17,20,24,28,32,38,44,51,

%T 60,67,79,91,104,120,138,154,180,203,232,262,300,335,385,428,489,543,

%U 620,688,782,861,979,1078,1222,1341,1518,1661,1875,2048,2308

%N Number of partitions of n into 9 nonprime parts.

%H Alois P. Heinz, <a href="/A341457/b341457.txt">Table of n, a(n) for n = 9..10000</a>

%p b:= proc(n, i, t) option remember; `if`(n=0,

%p `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+

%p `if`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))

%p end:

%p a:= n-> b(n$2, 9):

%p seq(a(n), n=9..68); # _Alois P. Heinz_, Feb 12 2021

%t b[n_, i_, t_] := b[n, i, t] = If[n == 0,

%t If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +

%t If[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];

%t a[n_] := b[n, n, 9];

%t Table[a[n], {n, 9, 68}] (* _Jean-François Alcover_, Feb 23 2022, after _Alois P. Heinz_ *)

%Y Cf. A002095, A005171, A018252, A062610, A259200, A341408, A341451, A341452, A341453, A341454, A341455.

%K nonn

%O 9,9

%A _Ilya Gutkovskiy_, Feb 12 2021