A058697
P(p(n)), P = primes (A000040), p = partition numbers (A000041).
Original entry on oeis.org
2, 2, 3, 5, 11, 17, 31, 47, 79, 113, 181, 263, 389, 547, 761, 1049, 1453, 1951, 2659, 3511, 4643, 6073, 7933, 10243, 13249, 16981, 21713, 27551, 34841, 43853, 55147, 68863, 85819, 106397, 131779, 162473, 199889, 245039, 300233, 365513
Offset: 0
A344677
Number of partitions of n containing a prime number of primes and an arbitrary number of nonprimes.
Original entry on oeis.org
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
Offset: 0
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].
-
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 *)
-
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
A343813
Number of partitions of prime(n) containing at least one prime.
Original entry on oeis.org
1, 2, 5, 12, 48, 88, 269, 450, 1176, 4355, 6558, 20958, 43412, 61733, 122194, 324532, 820827, 1107647, 2652517, 4655220, 6133664, 13751210, 23192039, 49730098, 132657130, 213646624, 270244858, 429702432, 540212859, 848899870, 3905568236, 5952945182, 11078643138
Offset: 1
a(4) = 12 because there are 12 partitions of prime(4) = 7 that contain at least one prime. These partitions are [7], [5,2], [5,1,1], [4,3], [4,2,1], [3,3,1], [3,2,2], [3,2,1,1], [3,1,1,1,1], [2,2,2,1], [2,2,1,1,1], [2,1,1,1,1,1].
-
nterms=20;Table[Total[Map[If[Count[#, _?PrimeQ]>0,1,0] &,IntegerPartitions[Prime[n]]]],{n,1,nterms}]
-
forprime(p=2,59,my(m=0); forpart(X=p, for(k=1,#X, if(isprime(X[k]),m++;break))); print1(m,", ")) \\ Hugo Pfoertner, Apr 30 2021
-
seq(n)={my(p=primes(n), m=p[#p]); vecextract(Vec(1/eta(x+O(x*x^m)) - 1/prod(k=1, m, 1-if(!isprime(k), x^k) + O(x*x^m)), -m), p)} \\ Andrew Howroyd, Apr 30 2021
-
from sympy.utilities.iterables import partitions
from sympy import sieve, prime
def A343813(n):
p = prime(n)
pset = set(sieve.primerange(2,p+1))
return sum(1 for d in partitions(p) if len(set(d)&pset) > 0) # Chai Wah Wu, May 01 2021
A182739
First differences of the partition numbers of the primes.
Original entry on oeis.org
2, 1, 4, 8, 41, 45, 196, 193, 765, 3310, 2277, 14795, 22946, 18678, 61493, 205177, 501889, 289685, 1558184, 2017516, 1488484, 7662961, 9489819, 26657456, 83235005, 81250196, 56767824, 159900439, 110796851, 309430388, 3062487667, 2050675209, 5133105512
Offset: 1
a(5) = A000041(A000040(5)) - A000041(A000040(4)) = A000041(11) - A000041(7) = 56 - 15 = 41.
-
with(combinat):
a:= n-> `if`(n=1, 2, (x->x[1]-x[2])(map(numbpart@ithprime, [n, n-1]))):
seq(a(n), n=1..40); # Alois P. Heinz, Jan 27 2011
-
Range[40] // Prime // PartitionsP // Differences // Prepend[#, 2]& (* Jean-François Alcover, Feb 21 2017 *)
A193830
Even partition numbers of prime numbers.
Original entry on oeis.org
2, 56, 490, 6842, 124754, 831820, 13848650, 133230930, 214481126, 271248950, 541946240, 851376628, 5964539504, 11097645016, 37027355200, 45060624582, 142798995930, 207890420102, 625846753120, 1820701100652, 3068829878530, 37561133582570, 114540884553038
Offset: 1
The even number 56 is in the sequence as the partition number of the prime number 11.
A193831
Odd partition numbers of prime numbers.
Original entry on oeis.org
3, 7, 15, 101, 297, 1255, 4565, 21637, 44583, 63261, 329931, 1121505, 2679689, 4697205, 6185689, 23338469, 49995925, 431149389, 3913864295, 13610949895, 80630964769, 362326859895, 749474411781, 2168627105469, 3646072432125, 10085065885767, 27152408925615
Offset: 1
The odd number 101 is in the sequence as the partition number of the prime number 13.
Original entry on oeis.org
0, 1, 3, 4, 9, 25, 41, 39, 168, 462, 442, 1939, 2571, 3998, 5123, 17040, 24853, 38887, 195022, 183430, 404386, 381060, 1162366, 2105509, 1799881, 5966593, 5380661, 14184985, 10473967, 22631261, 135452589, 109540327, 244730051, 487610708, 604467085, 671043205, 3350187738
Offset: 1
-
with(numtheory): with(combinat): p:=numbpart: P:=ithprime:
a:= n-> pi(phi(p(P(n)))):
seq(a(n), n=1..20);
-
a[n_] := PrimePi @ EulerPhi @ PartitionsP @ Prime @ n;
Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 25 2017 *)
A342621
Sum of the partition number of the prime factors of n with multiplicity.
Original entry on oeis.org
0, 2, 3, 4, 7, 5, 15, 6, 6, 9, 56, 7, 101, 17, 10, 8, 297, 8, 490, 11, 18, 58, 1255, 9, 14, 103, 9, 19, 4565, 12, 6842, 10, 59, 299, 22, 10, 21637, 492, 104, 13, 44583, 20, 63261, 60, 13, 1257, 124754, 11, 30, 16, 300, 105, 329931, 11, 63, 21, 493, 4567, 831820
Offset: 1
For n = 408 = 2^3*3*17, a(408) = 3 * A000041(2) + A000041(3) + A000041(17) = 3*2 + 3 + 297 = 306.
-
a:= n-> add(combinat[numbpart](i[1])*i[2], i=ifactors(n)[2]):
seq(a(n), n=1..70); # Alois P. Heinz, Mar 17 2021
-
{0}~Join~Array[Total@ Map[#2 PartitionsP[#1] & @@ # &, FactorInteger[#]] &, 58, 2] (* Michael De Vlieger, Mar 17 2021 *)
-
a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,2]*numbpart(f[k,1])); \\ Michel Marcus, Mar 17 2021
-
def a(n):
return sum([Partitions(primefactor).cardinality() for (primefactor,exponent) in factor(n) for _ in range(exponent)])
[a(n) for n in (1..100)]
A344715
Number of partitions of n containing a prime number of distinct primes and an arbitrary number of nonprimes.
Original entry on oeis.org
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
Offset: 0
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).
-
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
-
nterms=50;Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]],1,0] &,Map[DeleteDuplicates[#]&,IntegerPartitions[n],{1}]]],{n,0,nterms-1}]
-
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
A344890
Number of partitions of prime(n) containing a prime number of distinct primes and an arbitrary number of nonprimes.
Original entry on oeis.org
0, 0, 1, 3, 20, 42, 151, 265, 753, 3006, 4594, 15117, 31576, 45002, 89125, 235501, 589613, 792426, 1871442, 3251293, 4261819, 9403682, 15690192, 33111688, 86520382, 137957345, 173655404, 273492399, 342231447, 532915031, 2380864800, 3601147053, 6628703864
Offset: 1
a(4) = 3 because there are 3 partitions of prime(4)=7 that contain a prime number of primes (not counting repetitions). These partitions are [5,2] (containing 2 primes), [3,2,2] (containing 2 unique primes) and [3,2,1,1] (containing 2 primes).
-
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(ithprime(n)$2)):
seq(a(n), n=1..33); # Alois P. Heinz, Nov 14 2021
-
nterms=22;Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]],1,0] &,Map[DeleteDuplicates[#]&,IntegerPartitions[Prime[n]],{1}]]],{n,1,nterms}]
Comments