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.

Showing 1-1 of 1 results.

A268191 The difference between the two largest distinct parts of a partition (0 if no distinct parts), summed over all partitions of n.

Original entry on oeis.org

0, 0, 1, 3, 8, 14, 27, 42, 67, 101, 149, 210, 301, 416, 565, 770, 1030, 1368, 1800, 2357, 3055, 3962, 5068, 6485, 8232, 10444, 13125, 16506, 20600, 25701, 31865, 39483, 48644, 59906, 73375, 89846, 109515, 133379, 161784, 196078, 236801, 285720, 343623, 412866, 494624, 591991, 706623, 842625
Offset: 1

Views

Author

Emeric Deutsch, Feb 10 2016

Keywords

Examples

			a(5) = 8 because the partitions [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1] of 5 contribute 0, 3, 1, 2, 1, 1, and 0, respectively.
		

Crossrefs

Cf. A268190.

Programs

  • Maple
    g := add(add((i-j)*x^(i+j)/((1-x^i)*mul(1-x^k, k = 1 .. j)), j = 1 .. i-1), i = 2 .. 80): gser := series(g, x = 0, 55): seq(coeff(gser, x, n), n = 1 .. 50);
    # second Maple program:
    b:= proc(n, l, i) option remember; `if`(irem(n, i)=0,
          `if`(l=0, 0, i-l), 0) +`if`(i>n, 0, add(b(n-i*j,
          `if`(j=0, l, i), i+1), j=0..(n-1)/i))
        end:
    a:= n-> b(n, 0, 1):
    seq(a(n), n=1..50);  # Alois P. Heinz, Feb 11 2016
  • Mathematica
    b[n_, l_, i_] := b[n, l, i] = If[Mod[n, i] == 0, If[l == 0, 0, i-l], 0] + If[i>n, 0, Sum[b[n-i*j, If[j == 0, l, i], i+1], {j, 0, (n-1)/i}]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>0} k*A268190(n,k).
G.f.: g = Sum_{i>1} (Sum_{j = 1..i-1} ((i-j)*x^{i+j}/((1-x^i) * Product_{k=1..j} (1 - x^k)))).
Showing 1-1 of 1 results.