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!)
A344715 Number of partitions of n containing a prime number of distinct primes and an arbitrary number of nonprimes. 1
0, 0, 0, 0, 0, 1, 1, 3, 5, 9, 12, 20, 27, 42, 56, 80, 107, 151, 195, 265, 342, 453, 577, 753, 949, 1220, 1525, 1930, 2398, 3006, 3701, 4594, 5625, 6922, 8426, 10291, 12455, 15117, 18203, 21955, 26326, 31576, 37689, 45002, 53498, 63581, 75313, 89125, 105199, 124056 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
LINKS
EXAMPLE
a(10) = 12 because there are 12 partitions of 10 that contain a prime number of primes (not counting repetitions). These partitions are [7,3] (containing 2 primes), [7,2,1] (containing 2 primes), [5,3,2] (containing 3 primes), [5,3,1,1] (containing 2 primes), [5,2,2,1] (containing 2 distinct primes), [5,2,1,1,1] (containing 2 primes), [4,3,2,1] (containing 2 primes), [3,3,2,2] (containing 2 distinct primes), [3,3,2,1,1] (containing 2 distinct primes), [3,2,2,2,1] (containing 2 distinct primes), [3,2,2,1,1,1] (containing 2 distinct primes) and [3,2,1,1,1,1,1] (containing 2 primes).
MAPLE
b:= proc(n, i) option remember; expand(
`if`(n=0 or i=1, 1, b(n, i-1)+`if`(isprime(i), x, 1)
*add(b(n-i*j, i-1), j=1..n/i)))
end:
a:= n-> (p-> add(`if`(isprime(i), coeff(p, x, i), 0),
i=2..degree(p)))(b(n$2)):
seq(a(n), n=0..49); # Alois P. Heinz, Nov 14 2021
MATHEMATICA
nterms=50; Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]], 1, 0] &, Map[DeleteDuplicates[#]&, IntegerPartitions[n], {1}]]], {n, 0, nterms-1}]
PROG
(PARI) seq(n)={my(p=prod(k=2, n, 1 - y + y/(1 - if(isprime(k), x^k)) + O(x*x^n) ) ); Vec(sum(k=2, n, if(isprime(k), polcoef(p, k, y)))/eta(x+O(x*x^n))/subst(p, y, 1), -(n+1))} \\ Andrew Howroyd, May 27 2021
CROSSREFS
Sequence in context: A265702 A190310 A046746 * A058599 A238662 A365272
KEYWORD
nonn
AUTHOR
Paolo Xausa, May 27 2021
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 April 16 12:52 EDT 2024. Contains 371711 sequences. (Running on oeis4.)