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 24 results. Next

A219200 Number of partitions of n into 6 distinct primes.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 4, 0, 2, 1, 5, 1, 6, 0, 5, 2, 6, 1, 10, 1, 9, 4, 11, 3, 15, 3, 14, 6, 16, 6, 22, 5, 20, 10, 25, 11, 29, 9, 29, 16, 34, 17, 39, 15, 39, 25, 45, 24, 50, 25, 53, 35, 57, 34, 66, 36, 68, 48, 75, 50, 83, 52, 88, 65, 92, 69, 104
Offset: 41

Views

Author

Alois P. Heinz, Nov 14 2012

Keywords

Crossrefs

Column k=6 of A219180.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1,0$6], `if`(i<1, [0$7],
           zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$6],
           b(n-ithprime(i), i-1)[1..6])[]], 0)))
        end:
    a:= n-> b(n, numtheory[pi](n))[7]:
    seq(a(n), n=41..120);
  • Mathematica
    k = 6; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1], Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 41, 120}] (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
    Table[Count[IntegerPartitions[n,{6}],?(AllTrue[#,PrimeQ]&&Length[Union[#]]==6&)],{n,41,120}] (* _Harvey P. Dale, Sep 17 2023 *)

Formula

G.f.: Sum_{0
a(n) = [x^n*y^6] Product_{i>=1} (1+x^prime(i)*y).

A219201 Number of partitions of n into 7 distinct primes.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 4, 0, 3, 0, 3, 1, 6, 0, 6, 1, 5, 1, 10, 0, 11, 2, 9, 3, 16, 1, 17, 3, 15, 5, 25, 4, 24, 5, 25, 10, 35, 6, 34, 10, 36, 15, 48, 10, 50, 17, 52, 23, 65, 17, 69, 27, 70, 32, 89, 30, 93, 38, 93, 48, 116, 43, 121, 56, 125, 70, 148
Offset: 58

Author

Alois P. Heinz, Nov 14 2012

Keywords

Crossrefs

Column k=7 of A219180.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1,0$7], `if`(i<1, [0$8],
           zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$7],
           b(n-ithprime(i), i-1)[1..7])[]], 0)))
        end:
    a:= n-> b(n, numtheory[pi](n))[8]:
    seq(a(n), n=58..140);
  • Mathematica
    k = 7; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1], Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 58, 140}] (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
    Table[Length@Select[IntegerPartitions[k,{7}, Prime@Range@100], #[[1]] > #[[2]] > #[[3]] > #[[4]] > #[[5]] > #[[6]] > #[[7]] &], {k, 58, 140}] (* Robert Price, Apr 25 2025 *)

Formula

G.f.: Sum_{0
a(n) = [x^n*y^7] Product_{i>=1} (1+x^prime(i)*y).

A219202 Number of partitions of n into 8 distinct primes.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 3, 0, 1, 0, 3, 0, 5, 0, 4, 1, 5, 0, 10, 0, 6, 1, 10, 1, 15, 1, 10, 2, 17, 2, 23, 1, 17, 5, 27, 4, 32, 2, 30, 9, 38, 7, 48, 6, 43, 13, 56, 10, 70, 12, 62, 20, 78, 19, 98, 20, 86, 31, 109, 30, 128, 28, 121, 49, 145, 45, 170
Offset: 77

Author

Alois P. Heinz, Nov 14 2012

Keywords

Crossrefs

Column k=8 of A219180.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1,0$8], `if`(i<1, [0$9],
           zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$8],
           b(n-ithprime(i), i-1)[1..8])[]], 0)))
        end:
    a:= n-> b(n, numtheory[pi](n))[9]:
    seq(a(n), n=77..150);
  • Mathematica
    k = 8; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1] , Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 77, 150}] (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
    Table[Length@Select[IntegerPartitions[k,{8}, Prime@Range@100], #[[1]] > #[[2]] > #[[3]] > #[[4]] > #[[5]] > #[[6]] > #[[7]] > #[[8]] &], {k, 77, 150}] (* Robert Price, Apr 25 2025 *)

Formula

G.f.: Sum_{0
a(n) = [x^n*y^8] Product_{i>=1} (1+x^prime(i)*y).

A219203 Number of partitions of n into 9 distinct primes.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 1, 0, 5, 0, 4, 0, 2, 0, 9, 0, 7, 1, 6, 1, 13, 0, 10, 0, 12, 2, 20, 0, 19, 2, 20, 3, 31, 1, 30, 4, 28, 5, 49, 3, 45, 7, 43, 9, 69, 7, 63, 10, 66, 16, 97, 9, 91, 18, 96, 25, 130, 16, 131, 30, 134, 35, 177, 25, 182
Offset: 100

Author

Alois P. Heinz, Nov 14 2012

Keywords

Crossrefs

Column k=9 of A219180.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1,0$9], `if`(i<1, [0$10],
           zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$9],
           b(n-ithprime(i), i-1)[1..9])[]], 0)))
        end:
    a:= n-> b(n, numtheory[pi](n))[10]:
    seq(a(n), n=100..180);
  • Mathematica
    k = 9; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1] , Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 100, 180}] (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n,{9}],AllTrue[#,PrimeQ]&&Length[Union[#]] == 9&]],{n,100,180}] (* Harvey P. Dale, Mar 09 2023 *)

Formula

G.f.: Sum_{0
a(n) = [x^n*y^9] Product_{i>=1} (1+x^prime(i)*y).

A219204 Number of partitions of n into 10 distinct primes.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 3, 0, 1, 0, 4, 0, 5, 0, 3, 0, 7, 0, 9, 0, 7, 1, 10, 0, 16, 0, 9, 1, 18, 1, 25, 1, 16, 2, 30, 2, 35, 1, 25, 4, 45, 3, 53, 2, 45, 8, 62, 4, 79, 6, 67, 14, 90, 8, 112, 10, 96, 19, 126, 16, 158, 17, 135, 29, 182, 26, 210
Offset: 129

Author

Alois P. Heinz, Nov 14 2012

Keywords

Crossrefs

Column k=10 of A219180.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1,0$10], `if`(i<1, [0$11],
           zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$10],
           b(n-ithprime(i), i-1)[1..10])[]], 0)))
        end:
    a:= n-> b(n, numtheory[pi](n))[11]:
    seq(a(n), n=129..210);
  • Mathematica
    k = 10; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1] , Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 129, 210}] (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)
    Table[Length@Select[IntegerPartitions[k,{10}, Prime@Range@100], #[[1]] > #[[2]] > #[[3]] > #[[4]] > #[[5]] > #[[6]] > #[[7]] > #[[8]] > #[[9]] > #[[10]] &], {k, 129, 210}] (* Robert Price, Apr 25 2025 *)

Formula

G.f.: Sum_{0
a(n) = [x^n*y^10] Product_{i>=1} (1+x^prime(i)*y).

A299168 Number of ordered ways of writing n-th prime number as a sum of n primes.

Original entry on oeis.org

1, 0, 0, 0, 5, 6, 42, 64, 387, 5480, 10461, 113256, 507390, 1071084, 4882635, 44984560, 382362589, 891350154, 7469477771, 33066211100, 78673599501, 649785780710, 2884039365010, 22986956007816, 306912836483025, 1361558306986280, 3519406658042964
Offset: 1

Author

Ilya Gutkovskiy, Feb 04 2018

Keywords

Examples

			a(5) = 5 because fifth prime number is 11 and we have [3, 2, 2, 2, 2], [2, 3, 2, 2, 2], [2, 2, 3, 2, 2], [2, 2, 2, 3, 2] and [2, 2, 2, 2, 3].
		

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), b(n-j, t-1), 0), j=1..n)))
        end:
    a:= n-> b(ithprime(n), n):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    Table[SeriesCoefficient[Sum[x^Prime[k], {k, 1, n}]^n, {x, 0, Prime[n]}], {n, 1, 27}]

Formula

a(n) = [x^prime(n)] (Sum_{k>=1} x^prime(k))^n.

A347550 Number of partitions of n into at most 2 distinct prime parts.

Original entry on oeis.org

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

Author

Ilya Gutkovskiy, Sep 08 2021

Keywords

Crossrefs

Formula

a(n) = Sum_{k=0..2} A219180(n,k). - Alois P. Heinz, Sep 08 2021

A358010 Number of partitions of n into at most 5 distinct prime parts.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 4, 4, 4, 5, 5, 5, 6, 5, 6, 7, 6, 9, 7, 9, 9, 9, 11, 11, 11, 13, 12, 13, 15, 15, 17, 15, 18, 17, 20, 20, 23, 20, 25, 22, 27, 28, 28, 27, 30, 29, 36, 34, 38, 36, 41, 35, 48, 41, 48, 44, 50, 46, 58, 53, 61, 54, 64, 55, 72, 66, 74
Offset: 0

Author

Ilya Gutkovskiy, Oct 24 2022

Keywords

A358011 Number of partitions of n into at most 6 distinct prime parts.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 4, 4, 4, 5, 5, 5, 6, 5, 6, 7, 6, 9, 7, 9, 9, 9, 11, 11, 11, 13, 12, 14, 15, 15, 17, 16, 18, 19, 20, 21, 23, 22, 25, 26, 27, 30, 29, 32, 31, 35, 36, 39, 40, 42, 42, 45, 49, 50, 52, 55, 53, 61, 61, 67, 67, 70, 70, 77, 77, 86, 84
Offset: 0

Author

Ilya Gutkovskiy, Oct 24 2022

Keywords

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..100,2)]):
    G:= mul(1+t*x^p, p=P):
    f:= proc(n) local i,S;
       S:= coeff(G,x,n);
       add(coeff(S,t,i),i=0..6)
    end proc;
    map(f, [$0..100]); # Robert Israel, May 14 2025

Formula

a(n) = Sum_{k=0..6} A219180(n,k). - Alois P. Heinz, May 14 2025

A219181 Number of partitions of n into the maximal possible number of distinct prime parts or 0 if there are no such partitions.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 1, 3, 1, 3, 2, 4, 2, 4, 2, 5, 2, 1, 4, 1, 4, 1, 4, 1, 6, 2, 6, 1, 6, 2, 8, 4, 10, 2, 1, 5, 1, 6, 1, 5, 2, 6, 2, 10, 1, 9, 1, 11, 4, 15, 3, 14, 3, 1, 6, 1, 6, 1, 5, 1, 10, 1, 11
Offset: 0

Author

Alois P. Heinz, Nov 13 2012

Keywords

Comments

a(n) is the last element of row n of triangle A219180 or 0 if the row is empty. a(n) = 0 iff n in {1,4,6}.

Examples

			a(18) = 2 because there are 2 partitions of 18 into 3 distinct prime parts ([2,3,13], [2,5,11]) but no partitions of 18 into more than 3 distinct prime parts.
		

Programs

  • Maple
    with(numtheory):
    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-1))[]], 0)))
        end:
    a:= proc(n) local l; l:=b(n,pi(n));
           while nops(l)>0 and l[-1]=0 do
              l:= subsop(-1=NULL, l)
           od;
           `if`(nops(l)=0, 0, l[-1])
        end:
    seq(a(n), n=0..100);
  • Mathematica
    zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, zip[b[n, i-1], Join[{0}, If[Prime[i]>n, {}, b[n-Prime[i], i-1]]]]]]; a[n_] := (l = b[n, PrimePi[n]]; While[Length[l]>0 && l[[-1]] == 0, l = ReplacePart[l, -1 -> Nothing]]; If[Length[l] == 0, 0, l[[-1]]]);  Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 12 2017, translated from Maple *)

Formula

a(n) = A219180(n,A024936(n)) if A024936(n) >= 0, a(n) = 0 else.
Previous Showing 11-20 of 24 results. Next