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.

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

Views

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