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-4 of 4 results.

A219180 Number T(n,k) of partitions of n into k distinct prime parts; triangle T(n,k), n>=0, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 1, 0, 0, 1, 0, 0, 2, 2, 0, 1, 1, 1, 0, 0, 2, 2, 0, 0, 1, 2, 1, 0, 0, 2, 2, 0, 1, 0, 2, 2, 0, 0, 3, 2, 0, 0, 1, 2, 2, 0, 0, 2, 3, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 13 2012

Keywords

Comments

T(n,k) is defined for all n>=0 and k>=0. The triangle contains only elements with 0 <= k <= A024936(n). T(n,k) = 0 for k > A024936(n). Three rows are empty because there are no partitions of n into distinct prime parts for n in {1,4,6}.

Examples

			T(0,0) = 1: [], the empty partition.
T(2,1) = 1: [2].
T(5,1) = 1: [5], T(5,2) = 1: [2,3].
T(16,2) = 2: [5,11], [3,13].
Triangle T(n,k) begins:
  1;
  ;
  0, 1;
  0, 1;
  ;
  0, 1, 1;
  ;
  0, 1, 1;
  0, 0, 1;
  0, 0, 1;
  0, 0, 1, 1;
  0, 1;
  0, 0, 1, 1;
  ...
		

Crossrefs

Row lengths are 1 + A024936(n).
Row sums give: A000586.
Last elements of rows give: A219181.
Row maxima give: A219182.
Least n with T(n,k) > 0 is A007504(k).

Programs

  • Maple
    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:
    T:= proc(n) local l; l:= b(n, numtheory[pi](n));
           while nops(l)>0 and l[-1]=0 do l:= subsop(-1=NULL, l) od; l[]
        end:
    seq(T(n), n=0..50);
  • Mathematica
    nn=20;a=Table[Prime[n],{n,1,nn}];CoefficientList[Series[Product[1+y x^a[[i]],{i,1,nn}],{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Nov 21 2012 *)
    zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, f[PadRight[x, m, z], PadRight[y, m, z]]]; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, zip[Plus, b[n, i-1], Join[{0}, If[Prime[i] > n, {}, b[n-Prime[i], i-1]]], 0]]]; T[n_] := Module[{l}, l = b[n, PrimePi[n]]; While[Length[l]>0 && l[[-1]] == 0, l = ReplacePart[l, -1 -> Sequence[]]]; l]; Table[T[n], {n, 0, 50}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
  • PARI
    T(n)={ Vec(prod(k=1, n, 1 + isprime(k)*y*x^k + O(x*x^n))) }
    { my(t=T(20)); for(n=1, #t, print(if(t[n]!=0, Vecrev(t[n]), []))) } \\ Andrew Howroyd, Dec 22 2017

Formula

G.f. of column k: Sum_{0
T(n,k) = [x^n*y^k] Product_{i>=1} (1+x^prime(i)*y).

A341980 Number of partitions of n into 9 distinct primes (counting 1 as a prime).

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, 6, 0, 10, 0, 6, 1, 11, 1, 16, 1, 11, 2, 19, 2, 25, 1, 18, 5, 32, 4, 36, 2, 32, 9, 47, 7, 55, 7, 49, 14, 69, 10, 80, 12, 74, 22, 98, 19, 117, 22, 106, 34, 140, 31, 158, 32, 149, 54, 194, 48, 215, 50
Offset: 78

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 10)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 9):
    seq(a(n), n=78..151);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 10}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 9];
    Table[a[n], {n, 78, 151}] (* Jean-François Alcover, Feb 24 2022, after Alois P. Heinz *)

A341468 Number of partitions of n into 9 distinct nonprime parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 6, 7, 11, 12, 18, 20, 25, 30, 38, 45, 57, 67, 81, 95, 114, 133, 162, 187, 219, 255, 297, 343, 401, 462, 529, 607, 696, 793, 910, 1032, 1168, 1324, 1497, 1689, 1905, 2142, 2400, 2692, 3009, 3362, 3754, 4182, 4643, 5165
Offset: 79

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i b(n$2, 9):
    seq(a(n), n=79..130);  # 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 - 1], t - 1], 0]]];
    a[n_] := b[n, n, 9];
    Table[a[n], {n, 79, 130}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)

A344989 Smallest number whose number of partitions into n distinct primes is n, or zero if there are no such partitions.

Original entry on oeis.org

2, 16, 26, 33, 55, 59, 0, 0, 124, 159, 233, 227, 276, 0, 372, 480, 0, 0, 0, 752, 0, 920, 0, 1011, 0, 1211, 1425, 0, 0, 0, 0, 0, 2050, 2336, 2495, 0, 0, 0, 0, 3340, 0, 3712, 0, 0, 4303, 0, 0, 0, 0, 5195, 0, 5669, 0, 6163, 6673, 0, 0, 0, 7504, 0, 0, 8670, 0, 9304, 9623, 0, 0, 0, 10638, 10981, 0, 12062, 0
Offset: 1

Author

Metin Sariyar, Jun 04 2021

Keywords

Comments

From David A. Corneth, Aug 21 2025: (Start)
How to prove a 0? I used the heuristic:
a(n) = 0 if 2*n consecutive integers can be written in strictly more than n ways as a sum of n distinct primes and up to that point no positive integer has exactly n such ways.
What other rules where used? (End)

Examples

			a(2) = 16 because 16 is the smallest number whose number of partitions into 2 distinct primes is 2; 16 = 3+13 = 5+11.
		

Crossrefs

Cf. A364692 asks for the largest number with the same properties.

Extensions

a(12)-a(20) from Alois P. Heinz, Jun 04 2021
More terms from David A. Corneth, Aug 21 2025
Showing 1-4 of 4 results.