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!)
A344677 Number of partitions of n containing a prime number of primes and an arbitrary number of nonprimes. 3
0, 0, 0, 0, 1, 2, 4, 6, 9, 13, 20, 26, 36, 49, 68, 90, 120, 154, 201, 258, 330, 418, 532, 666, 834, 1041, 1290, 1592, 1958, 2404, 2935, 3588, 4345, 5278, 6366, 7692, 9215, 11096, 13230, 15853, 18831, 22477, 26580, 31620, 37247, 44145, 51851, 61247, 71681, 84445 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
EXAMPLE
a(6) = 4 because there are 4 partitions of 6 that contain a prime number of primes (including repetitions). These partitions are [3,3], [3,2,1], [2,2,2], [2,2,1,1].
MATHEMATICA
nterms=50; Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]], 1, 0] &, IntegerPartitions[n]]], {n, 0, nterms-1}]
(* Second program: *)
seq[n_] := Module[{p}, p = 1/Product[1 - If[PrimeQ[k], y*x^k, 0] + O[x]^n, {k, 2, n}]; CoefficientList[Sum[If[PrimeQ[k], Coefficient[p, y, k], 0], {k, 2, n}]/QPochhammer[x + O[x]^n]/(p /. y -> 1), x]];
seq[50] (* Jean-François Alcover, May 27 2021, after Andrew Howroyd *)
PROG
(PARI) seq(n)={my(p=1/prod(k=2, n, 1 - if(isprime(k), y*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 26 2021
CROSSREFS
Sequence in context: A081659 A143586 A363457 * A241546 A280918 A081225
KEYWORD
nonn
AUTHOR
Paolo Xausa, May 26 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 February 21 07:26 EST 2024. Contains 370219 sequences. (Running on oeis4.)