login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Number of partitions of n into 4 parts with at least one prime part.
1

%I #6 Oct 24 2021 18:08:22

%S 0,0,0,0,0,1,2,2,5,5,8,10,13,16,21,24,31,35,41,49,57,64,75,84,95,107,

%T 119,133,147,164,179,198,215,236,256,281,300,329,349,382,407,441,465,

%U 506,531,575,603,652,681,733,765,822,853,919,952,1019,1057,1128,1166,1247,1284

%N Number of partitions of n into 4 parts with at least one prime part.

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

%F a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} sign( c(k) + c(j) + c(i) + c(n-i-j-k) ), where c is the prime characteristic (A010051).

%p b:= proc(n, i, t) option remember; series(

%p `if`(n=0, t, `if`(i<1, 0, expand(x*b(n-i, min(n-i, i),

%p `if`(isprime(i), 1, t)))+b(n, i-1, t))), x, 5)

%p end:

%p a:= n-> coeff(b(n$2, 0), x, 4):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Oct 24 2021

%t Table[Sum[Sum[Sum[Sign[(PrimePi[k] - PrimePi[k - 1]) + (PrimePi[j] - PrimePi[j - 1]) + (PrimePi[i] - PrimePi[i - 1]) + (PrimePi[n - i - j - k] - PrimePi[n - i - j - k - 1])], {i, j, Floor[(n - j - k)/2]}], {j, k, Floor[(n - k)/3]}], {k, Floor[n/4]}], {n, 0, 100}]

%Y Cf. A010051, A026810, A340571.

%K nonn

%O 0,7

%A _Wesley Ivan Hurt_, Jan 11 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 23 08:25 EDT 2024. Contains 376146 sequences. (Running on oeis4.)