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.

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