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.

Showing 1-10 of 21 results. Next

A259201 Number of partitions of n into ten primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 7, 8, 9, 11, 11, 14, 16, 18, 20, 25, 24, 31, 33, 38, 39, 48, 47, 59, 59, 69, 69, 87, 80, 102, 98, 118, 114, 143, 131, 168, 154, 191, 179, 227, 200, 261, 236, 297, 268, 344, 300, 396, 345, 442, 390, 509, 431, 576, 493, 641, 551, 729
Offset: 20

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(23) = 2 because there are 2 partitions of 23 into ten primes: [2,2,2,2,2,2,2,2,2,5] and [2,2,2,2,2,2,2,3,3,3].
		

Crossrefs

Column k=10 of A117278.
Number of partitions of n into r primes for r = 1-9: A010051, A061358, A068307, A259194, A259195, A259196, A259197, A259198, A259200.

Programs

  • Magma
    [#RestrictedPartitions(k,10,Set(PrimesUpTo(1000))):k in [20..80]] ; // Marius A. Burtea, Jul 13 2019

Formula

a(n) = [x^n y^10] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = Sum_{r=1..floor(n/10)} Sum_{q=r..floor((n-r)/9)} Sum_{p=q..floor((n-q-r)/8)} Sum_{o=p..floor((n-p-q-r)/7)} Sum_{m=o..floor((n-o-p-q-r)/6)} Sum_{l=m..floor((n-m-o-p-q-r)/5)} Sum_{k=l..floor((n-l-m-o-p-q-r)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q-r)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q-r)/2)} A010051(r) * A010051(q) * A010051(p) * A010051(o) * A010051(m) * A010051(l) * A010051(k) * A010051(j) * A010051(i) * A010051(n-i-j-k-l-m-o-p-q-r). - Wesley Ivan Hurt, Jul 13 2019

A117278 Triangle read by rows: T(n,k) is the number of partitions of n into k prime parts (n>=2, 1<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 0, 2, 1, 3, 2, 1, 1, 0, 1, 3, 2, 3, 2, 1, 0, 2, 2, 3, 3, 2, 1, 1, 1, 0, 4, 3, 3, 3, 2, 1, 0, 2, 2, 4, 3, 4, 2, 1, 1, 1, 1, 3, 4, 5, 3, 3, 2, 1, 0, 2, 2, 6, 4, 4, 4, 2, 1, 1, 0, 1, 5, 3, 6
Offset: 2

Views

Author

Emeric Deutsch, Mar 07 2006

Keywords

Comments

Row n has floor(n/2) terms. Row sums yield A000607. T(n,1) = A010051(n) (the characteristic function of the primes). T(n,2) = A061358(n). Sum(k*T(n,k), k>=1) = A084993(n).

Examples

			T(12,3) = 2 because we have [7,3,2] and [5,5,2].
Triangle starts:
  1;
  1;
  0, 1;
  1, 1;
  0, 1, 1;
  1, 1, 1;
  0, 1, 1, 1;
  0, 1, 2, 1;
  ...
		

Crossrefs

Row sums give A000607.
T(A000040(n),n) gives A259254(n).

Programs

  • Maple
    g:=1/product(1-t*x^(ithprime(j)),j=1..30): gser:=simplify(series(g,x=0,30)): for n from 2 to 22 do P[n]:=sort(coeff(gser,x^n)) od: for n from 2 to 22 do seq(coeff(P[n],t^j),j=1..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember;
          `if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1),
           [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i))[]], 0)))
        end:
    T:= n-> subsop(1=NULL, b(n, numtheory[pi](n)))[]:
    seq(T(n), n=2..25);  # Alois P. Heinz, Nov 16 2012
  • Mathematica
    (* As triangle: *) nn=20;a=Product[1/(1-y x^i),{i,Table[Prime[n],{n,1,nn}]}];Drop[CoefficientList[Series[a,{x,0,nn}],{x,y}],2,1]//Grid (* Geoffrey Critzer, Oct 30 2012 *)
  • PARI
    parts(n, pred)={prod(k=1, n, if(pred(k), 1/(1-y*x^k) + O(x*x^n), 1))}
    {my(n=15); apply(p->Vecrev(p/y), Vec(parts(n, isprime)-1))} \\ Andrew Howroyd, Dec 28 2017

Formula

G.f.: G(t,x) = -1+1/product(1-tx^(p(j)), j=1..infinity), where p(j) is the j-th prime.

A259196 Number of partitions of n into six primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 3, 4, 5, 6, 6, 8, 7, 10, 10, 12, 11, 16, 12, 19, 17, 22, 18, 26, 20, 31, 24, 33, 27, 42, 29, 47, 35, 51, 38, 60, 41, 68, 47, 73, 53, 86, 54, 95, 64, 103, 70, 116, 73, 131, 81, 137, 89, 156, 92, 171, 103, 180, 112, 202, 117, 223, 127, 232
Offset: 12

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 3 because there are 3 partitions of 17 into six primes: [2,2,2,2,2,7], [2,2,2,3,3,5] and [2,3,3,3,3,3].
		

Crossrefs

Column k=6 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, this sequence, A259197, A259198, A259200, A259201.
Cf. A000040.

Programs

Formula

a(n) = Sum_{m=1..floor(n/6)} Sum_{l=m..floor((n-m)/5)} Sum_{k=l..floor((n-l-m)/4)} Sum_{j=k..floor((n-k-l-m)/3)} Sum_{i=j..floor((n-j-k-l-m)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(n-i-j-k-l-m). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^6] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

A259197 Number of partitions of n into seven primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 6, 6, 8, 8, 9, 10, 14, 12, 16, 16, 19, 19, 26, 22, 30, 26, 34, 31, 43, 33, 48, 42, 56, 47, 66, 51, 77, 60, 84, 68, 99, 73, 112, 86, 123, 95, 143, 103, 162, 116, 174, 131, 200, 137, 220, 156, 241, 171, 270, 180, 300, 202, 322, 223, 359
Offset: 14

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 2 because there are 2 partitions of 17 into seven primes: [2,2,2,2,2,2,5] and [2,2,2,2,3,3,3].
		

Crossrefs

Column k=7 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, A259196, this sequence, A259198, A259200, A259201.
Cf. A000040.

Programs

  • Mathematica
    Table[Length@IntegerPartitions[n, {7}, Prime@Range@100], {n, 14, 100}] (* Robert Price, Apr 25 2025 *)

Formula

a(n) = Sum_{o=1..floor(n/7)} Sum_{m=o..floor((n-o)/6)} Sum_{l=m..floor((n-m-o)/5)} Sum_{k=l..floor((n-l-m-o)/4)} Sum_{j=k..floor((n-k-l-m-o)/3)} Sum_{i=j..floor((n-j-k-l-m-o)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(o) * A010051(n-i-j-k-l-m-o). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^7] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

A259198 Number of partitions of n into eight primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 10, 9, 12, 14, 16, 16, 21, 19, 26, 26, 31, 30, 39, 34, 46, 43, 53, 48, 65, 56, 77, 66, 85, 77, 104, 84, 118, 99, 133, 112, 155, 123, 177, 143, 196, 162, 227, 174, 256, 200, 282, 220, 318, 241, 360, 270, 389, 300, 442, 322
Offset: 16

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(20) = 2 because there are 2 partitions of 20 into eight primes: [2,2,2,2,2,2,3,5] and [2,2,2,2,3,3,3,3].
		

Crossrefs

Column k=8 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, A259196, A259197, this sequence, A259200, A259201.
Cf. A000040.

Programs

  • Mathematica
    Table[Length@IntegerPartitions[n, {8}, Prime@Range@100], {n, 16, 100}] (* Robert Price, Apr 25 2025 *)

Formula

a(n) = Sum_{p=1..floor(n/8)} Sum_{o=p..floor((n-p)/7)} Sum_{m=o..floor((n-o-p)/6)} Sum_{l=m..floor((n-m-o-p)/5)} Sum_{k=l..floor((n-l-m-o-p)/4)} Sum_{j=k..floor((n-k-l-m-o-p)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(o) * A010051(p) * A010051(n-i-j-k-l-m-o-p). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^8] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = A326455(n)/n for n > 0. - Wesley Ivan Hurt, Jul 06 2019

A259194 Number of partitions of n into four primes.

Original entry on oeis.org

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
Offset: 0

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			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.
		

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.

Programs

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

A259195 Number of partitions of n into five primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 5, 4, 6, 6, 7, 6, 10, 7, 11, 9, 12, 11, 17, 11, 18, 13, 20, 14, 24, 15, 27, 18, 29, 21, 35, 19, 38, 24, 41, 26, 47, 26, 53, 30, 54, 34, 64, 33, 70, 38, 73, 41, 81, 41, 89, 45, 92, 50, 103, 47, 112, 56, 117, 61, 127, 57
Offset: 0

Views

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 3 because 17 can be written as the sum of five primes in exactly three ways: 2+2+3+3+7, 2+2+3+5+5, and 3+3+3+3+5.
		

Crossrefs

Column k=5 of A117278.
Number of partitions of n into r primes for r = 1..10: A010051, A061358, A068307, A259194, this sequence, A259196, A259197, A259198, A259200, A259201.
Cf. A000040.

Programs

Formula

a(n) = Sum_{l=1..floor(n/5)} Sum_{k=l..floor((n-l)/4)} Sum_{j=k..floor((n-k-l)/3)} Sum_{i=j..floor((n-j-k-l)/2)} c(i) * c(j) * c(k) * c(l) * c(n-i-j-k-l), where c = A010051. - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^5] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

Extensions

More terms from David A. Corneth, Sep 06 2020

A340965 Number of ways to write n as an ordered sum of 9 primes.

Original entry on oeis.org

1, 9, 36, 93, 198, 387, 696, 1170, 1845, 2740, 3960, 5562, 7566, 10125, 13248, 17133, 22014, 27774, 34776, 43173, 53010, 64869, 78696, 94617, 113415, 134946, 159552, 188164, 219960, 256041, 297180, 342846, 394614, 452595, 516276, 587997, 667938, 755109, 852444
Offset: 18

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 9):
    seq(a(n), n=18..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^9, {x, 0, nmax}], x] // Drop[#, 18] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^9.

A341457 Number of partitions of n into 9 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 44, 51, 60, 67, 79, 91, 104, 120, 138, 154, 180, 203, 232, 262, 300, 335, 385, 428, 489, 543, 620, 688, 782, 861, 979, 1078, 1222, 1341, 1518, 1661, 1875, 2048, 2308
Offset: 9

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 9):
    seq(a(n), n=9..68);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 9];
    Table[a[n], {n, 9, 68}] (* Jean-François Alcover, Feb 23 2022, after Alois P. Heinz *)

A326540 Sum of all the parts in the partitions of n into 9 primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 42, 44, 69, 96, 100, 130, 189, 196, 261, 300, 341, 384, 528, 544, 700, 756, 888, 988, 1287, 1240, 1599, 1638, 2021, 2024, 2655, 2438, 3243, 3120, 3920, 3850, 4998, 4420, 6042, 5616, 7205, 6608
Offset: 0

Views

Author

Wesley Ivan Hurt, Jul 13 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n * Sum[Sum[Sum[Sum[Sum[Sum[Sum[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[j] - PrimePi[j - 1]) (PrimePi[k] - PrimePi[k - 1]) (PrimePi[l] - PrimePi[l - 1]) (PrimePi[m] - PrimePi[m - 1]) (PrimePi[o] - PrimePi[o - 1]) (PrimePi[p] - PrimePi[p - 1]) (PrimePi[q] - PrimePi[q - 1]) (PrimePi[n - i - j - k - l - m - o - p - q] - PrimePi[n - i - j - k - l - m - o - p - q - 1]), {i, j, Floor[(n - j - k - l - m - o - p - q)/2]}], {j, k, Floor[(n - k - l - m - o - p - q)/3]}], {k, l, Floor[(n - l - m - o - p - q)/4]}], {l, m, Floor[(n - m - o - p - q)/5]}], {m, o, Floor[(n - o - p - q)/6]}], {o, p, Floor[(n - p - q)/7]}], {p, q, Floor[(n - q)/8]}], {q, Floor[n/9]}], {n, 0, 50}]

Formula

a(n) = n * Sum_{q=1..floor(n/9)} Sum_{p=q..floor((n-q)/8)} Sum_{o=p..floor((n-p-q)/7)} Sum_{m=o..floor((n-o-p-q)/6)} Sum_{l=m..floor((n-m-o-p-q)/5)} Sum_{k=l..floor((n-l-m-o-p-q)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q)/2)} c(q) * c(p) * c(o) * c(m) * c(l) * c(k) * c(j) * c(i) * c(n-i-j-k-l-m-o-p-q), where c = A010051.
a(n) = n * A259200(n).
a(n) = A326541(n) + A326542(n) + A326543(n) + A326544(n) + A326545(n) + A326546(n) + A326547(n) + A326548(n) + A326549(n).
Showing 1-10 of 21 results. Next