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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259194 Number of partitions of n into four primes. 19
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 2, 3, 3, 4, 4, 6, 3, 6, 5, 7, 5, 9, 5, 11, 7, 11, 7, 13, 6, 14, 9, 15, 8, 18, 9, 21, 10, 19, 11, 24, 10, 26, 12, 26, 13, 30, 12, 34, 15, 33, 16, 38, 14, 41, 17, 41, 16, 45, 16, 50, 19, 47, 21, 56, 20, 61, 20, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,12
LINKS
FORMULA
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(n-i-j-k). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^4] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
EXAMPLE
a(17) = 3 because 17 can be written as the sum of four primes in exactly three ways: 2+2+2+11, 2+3+5+7 and 2+5+5+5.
MATHEMATICA
a[n_] := Length@ IntegerPartitions[n, {4}, Prime@ Range@ PrimePi@ n]; a /@
Range[0, 100] (* Giovanni Resta, Jun 21 2015 *)
Table[Count[IntegerPartitions[n, {4}], _?(AllTrue[#, PrimeQ]&)], {n, 0, 80}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 03 2019 *)
PROG
(PARI) a(n) = {nb = 0; forpart(p=n, if (#p && (#select(x->isprime(x), Vec(p)) == #p), nb+=1), , [4, 4]); nb; } \\ Michel Marcus, Jun 21 2015
(Magma) [0] cat [#RestrictedPartitions(n, 4, {d:d in PrimesUpTo(n)}):n in [1..100]]; // Marius A. Burtea, May 07 2019
CROSSREFS
Column k=4 of A117278.
Number of partitions of n into r primes for r = 1..10: A010051, A061358, A068307, this sequence, A259195, A259196, A259197, A259198, A259200, A259201.
Cf. A000040.
Sequence in context: A078705 A346018 A050331 * A194344 A128435 A369219
KEYWORD
nonn,easy
AUTHOR
Doug Bell, Jun 20 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)