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.

A149187 a(n) = total number of partitions of [1, 2, ..., k] into exactly n blocks, each of size 1, 2, ..., 6, for 0 <= k <= 6n.

Original entry on oeis.org

1, 6, 1709, 9268549, 295887993624, 34155922905682979, 10893033763705794846727, 8064519699524417149584982475, 12261371699318896159811165091392898, 34949877647533654983311522321749656046802, 174047342897498341701547082125166096889157924610, 1431472607165249058159939223685478666695036430843693596
Offset: 0

Views

Author

N. J. A. Sloane, May 13 2009

Keywords

Comments

Also, number of scenarios in the Gift Exchange Game when a gift can be stolen at most 5 times. - N. J. A. Sloane, Jan 25 2017

Crossrefs

Cf. A144512.
The gift scenarios sequences when a gift can be stolen at most s times, for s = 1..9, are A001515, A144416, A144508, A144509, A149187, A281358, A281359, A281360, A281361.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, t) option remember; `if`(t*i add(b(k, 6, n), k=0..6*n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 17 2015
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_, t_] := b[n, i, t] = If[t*i < n, 0, If[n == 0, If[t == 0, 1, 0], Sum[b[n-i*j, i-1, t-j]* multinomial[n, Prepend[Array[i&, j], n-i*j]]/j!, {j, 0, Min[t, n/i]}]]]; a[n_] := Sum[b[k, 6, n], {k, 0, 6*n}];  Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Dec 06 2016 after Alois P. Heinz *)
  • PARI
    {a(n) = sum(i=n, 6*n, i!*polcoef(sum(j=1, 6, x^j/j!)^n, i))/n!} \\ Seiichi Manyama, May 22 2019