cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 21 results. Next

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

Views

Author

N. J. A. Sloane, Dec 31 2000

Keywords

Comments

Prime number whose index is the n-th partition number. - Omar E. Pol, Aug 05 2011

Crossrefs

Cf. A058698.

Programs

  • Mathematica
    Prime[PartitionsP[Range[0,40]]] (* Harvey P. Dale, Sep 21 2014 *)
  • PARI
    a(n)={prime(numbpart(n))} \\ Andrew Howroyd, Dec 28 2017

Formula

a(n) = A000040(A000041(n)). - Omar E. Pol, Aug 05 2011

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

Views

Author

Paolo Xausa, May 26 2021

Keywords

Examples

			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].
		

Crossrefs

Programs

  • 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 *)
  • 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

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

Views

Author

Paolo Xausa, Apr 30 2021

Keywords

Examples

			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].
		

Crossrefs

Programs

  • Mathematica
    nterms=20;Table[Total[Map[If[Count[#, _?PrimeQ]>0,1,0] &,IntegerPartitions[Prime[n]]]],{n,1,nterms}]
  • PARI
    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
    
  • PARI
    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
    
  • Python
    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

Formula

a(n) = A235945(A000040(n)).

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

Views

Author

Omar E. Pol, Jan 27 2011

Keywords

Comments

This is the first prime 2, followed by the first differences of the partition numbers of primes.

Examples

			a(5) = A000041(A000040(5)) - A000041(A000040(4)) = A000041(11) - A000041(7) = 56 - 15 = 41.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    Range[40] // Prime // PartitionsP // Differences // Prepend[#, 2]& (* Jean-François Alcover, Feb 21 2017 *)

Formula

a(1) = 2; a(n) = A000041(A000040(n)) - A000041(A000040(n-1)) for n>1.

Extensions

More terms from Alois P. Heinz, Jan 27 2011

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

Views

Author

Omar E. Pol, Aug 06 2011

Keywords

Examples

			The even number 56 is in the sequence as the partition number of the prime number 11.
		

Crossrefs

Programs

  • Mathematica
    Select[PartitionsP[Prime[Range[200]]],EvenQ] (* Harvey P. Dale, Jun 20 2015 *)

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

Views

Author

Omar E. Pol, Aug 06 2011

Keywords

Examples

			The odd number 101 is in the sequence as the partition number of the prime number 13.
		

Crossrefs

A247087 a(n) = pi(phi(p(P(n)))) = A000720(A000010(A000041(A000040(n)))).

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

Views

Author

Alois P. Heinz, Mar 14 2015

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): p:=numbpart: P:=ithprime:
    a:= n-> pi(phi(p(P(n)))):
    seq(a(n), n=1..20);
  • Mathematica
    a[n_] := PrimePi @ EulerPhi @ PartitionsP @ Prime @ n;
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 25 2017 *)

Formula

Extensions

a(31)-a(37) from Amiram Eldar, Sep 03 2024

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

Views

Author

Eric Desbiaux, Mar 16 2021

Keywords

Examples

			For n = 408 = 2^3*3*17, a(408) = 3 * A000041(2) + A000041(3) + A000041(17) = 3*2 + 3 + 297 = 306.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    {0}~Join~Array[Total@ Map[#2 PartitionsP[#1] & @@ # &, FactorInteger[#]] &, 58, 2] (* Michael De Vlieger, Mar 17 2021 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,2]*numbpart(f[k,1])); \\ Michel Marcus, Mar 17 2021
  • Sage
    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)]
    

Formula

a(A003586(n)) - A001414(A003586(n)) = 0.
a(A006899(n)) * A008480(A006899(n)) - A001414(A006899(n)) = 0.
a(n) = Sum_{k=1..A001222(n)} A000041(A027746(n,k)). - Alois P. Heinz, Apr 09 2021

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

Views

Author

Paolo Xausa, May 27 2021

Keywords

Examples

			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).
		

Crossrefs

Programs

  • 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}]
  • 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

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

Views

Author

Paolo Xausa, Jun 01 2021

Keywords

Examples

			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).
		

Crossrefs

Programs

  • 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(ithprime(n)$2)):
    seq(a(n), n=1..33);  # Alois P. Heinz, Nov 14 2021
  • Mathematica
    nterms=22;Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]],1,0] &,Map[DeleteDuplicates[#]&,IntegerPartitions[Prime[n]],{1}]]],{n,1,nterms}]

Formula

a(n) = A344715(A000040(n)).

Extensions

a(23)-a(33) from Alois P. Heinz, Jun 02 2021
Previous Showing 11-20 of 21 results. Next