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.

A339011 Sum over all partitions of n of the product of the number of parts and the number of distinct parts.

Original entry on oeis.org

0, 1, 3, 8, 17, 34, 61, 107, 176, 284, 442, 676, 1007, 1483, 2140, 3055, 4299, 5993, 8255, 11284, 15272, 20529, 27373, 36274, 47735, 62484, 81293, 105251, 135555, 173818, 221836, 282003, 356980, 450256, 565765, 708537, 884296, 1100287, 1364736, 1687952, 2081724
Offset: 0

Views

Author

Alois P. Heinz, Nov 18 2020

Keywords

Crossrefs

Essentially partial sums of A093694.

Programs

  • Maple
    b:= proc(n, i, p, d) option remember; `if`(n=0, d*p, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j, `if`(j=0, d, d+1)), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$2):
    seq(a(n), n=0..50);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n<=0 or i=0, [0$2],
         `if`(i=1, [1, n], b(n, i-1)+ (p-> p+[0, p[1]])(b(n-i, i))))
        end:
    a:= proc(n) option remember; b(n$2)[2]+`if`(n<0, 0, a(n-1)) end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Jul 25 2022
  • Mathematica
    b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, d*p, If[i < 1, 0,
         Sum[b[n - i*j, i - 1, p + j, If[j == 0, d, d + 1]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)