login
Number of partitions of n into 1, 2 or 3 nonprime parts.
4

%I #23 Dec 09 2024 05:49:59

%S 1,1,1,1,1,2,1,3,3,4,3,5,4,6,5,9,7,10,8,12,10,15,11,18,15,20,17,24,19,

%T 28,22,30,26,36,29,41,34,42,37,51,41,55,47,59,53,66,54,73,63,78,70,85,

%U 72,94,81,99,89,108,92,118,102,121,110,135,117,143,126

%N Number of partitions of n into 1, 2 or 3 nonprime parts.

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F a(n) = c(n) + ( Sum_{i=1..floor(n/2)} c(i) * c(n-i) ) + ( Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} c(i) * c(j) * c(n-i-j) ), where c = A005171.

%e a(9) = 3, because 9 can be written as the sum of nonprimes with at most 3 parts in three ways: 9 = 8+1 = 4+4+1.

%e a(10) = 4, because 10 can be written as the sum of nonprimes with at most 3 parts in four ways: 10 = 9+1 = 6+4 = 8+1+1.

%e a(11) = 3, because 11 can be written as the sum of nonprimes with at most 3 parts in three ways: 10+1 = 9+1+1 = 6+4+1.

%e a(12) = 5, because 12 can be written as the sum of nonprimes with at most 3 parts in five ways: 12 = 8+4 = 6+6 = 10+1+1 = 4+4+4.

%Y Cf. A005171, A018252, A071335.

%K nonn,easy

%O 1,6

%A _Wesley Ivan Hurt_, May 01 2019