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.

A322304 Total number of colors in all partitions of n into colored blocks of equal parts, such that all colors from a given set are used and the colors are introduced in increasing order.

Original entry on oeis.org

0, 1, 2, 5, 9, 17, 32, 55, 93, 154, 257, 407, 648, 1003, 1546, 2367, 3566, 5323, 7889, 11579, 16854, 24495, 35171, 50345, 71520, 101184, 142118, 198981, 277260, 384457, 530875, 730220, 1000192, 1365105, 1856155, 2514737, 3398397, 4574460, 6141309, 8218229
Offset: 0

Views

Author

Alois P. Heinz, Aug 28 2019

Keywords

Examples

			a(4) = 9. The colored partitions are: 1111a, 2a11a, 22a, 3a1a, 4a, 2a11b, 3a1b.  The total number of colors used is 1+1+1+1+1+2+2 = 9.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
         (t-> b(t, min(t, i-1), k))(n-i*j), j=1..n/i)*k+b(n, i-1, k)))
        end:
    a:= proc(n) option remember; add(add(binomial(k, i)*(-1)^i*
          b(n$2, k-i), i=0..k)/(k-1)!, k=1..floor((sqrt(1+8*n)-1)/2))
        end:
    seq(a(n), n=0..44);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[With[{t = n - i j}, b[t, Min[t, i - 1], k]], {j, 1, n/i}] k + b[n, i - 1, k]]];
    a[n_] := Sum[Sum[Binomial[k, i] (-1)^i b[n, n, k - i], {i, 0, k}]/(k - 1)!, {k, 1, Floor[(Sqrt[1 + 8n] - 1)/2]}];
    a /@ Range[0, 44] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..A003056(n)} k * A321878(n,k).