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-2 of 2 results.

A188814 Sum of the "complements" of the integer partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 4, 12, 27, 57, 107, 192, 327, 538, 855, 1329, 2018, 3003, 4402, 6349, 9045, 12720, 17713, 24395, 33335, 45118, 60655, 80888, 107242, 141177, 184905, 240679, 311850, 401860, 515725, 658630, 838006, 1061561, 1340193, 1685271, 2112576, 2638727
Offset: 0

Views

Author

Geoffrey Critzer, Apr 22 2011

Keywords

Comments

Consider the m x k rectangle corresponding to an integer partition p of n, where m is the greatest part of p and k is the number of parts of p. Fit the Ferrers diagram of p inside its corresponding rectangle. a(n) is the number of empty spaces in all such rectangles over all partitions of n.

Examples

			a(4) = 4 because the partitions 4, 2+2, 1+1+1+1 have no empty spaces while the partitions 3+1 and 2+1+1 each have two.
		

References

  • Sriram Pemmaraju and Steven Skiena, Computational Discrete Mathematics, Cambridge, 2003, page 145.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        elif i<1 then [0, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+g[1]]
          fi
        end:
    a:= n-> add(add(i, i=b(n-j, min(j, n-j)))*j, j=1..n) -n*b(n, n)[1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Apr 22 2011, Apr 11 2012
  • Mathematica
    f[list_]:= Total[Select[Reverse[Table[Max[list]-list[[i]],{i,1,Length[list]}]],#>0&]];
    Table[Total[Map[f, IntegerPartitions[n]]],{n,0,30}]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{f, g}, If [n==0 || i==1, {1, n}, If[i<1, {0, 0}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + g[[1]]}]];
    a[n_] := Sum[Sum[i, {i, b[n-j, Min[j, n-j]]}]*j, {j, 1, n}]-n*b[n,n][[1]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>0} k*A268192(n,k). - Alois P. Heinz, Feb 12 2016

A368985 a(n) = sum of the side lengths of the minimum containing squares of all partitions of n.

Original entry on oeis.org

0, 1, 4, 8, 16, 27, 47, 72, 115, 170, 255, 364, 527, 732, 1026, 1401, 1916, 2568, 3451, 4556, 6023, 7859, 10245, 13217, 17041, 21766, 27770, 35173, 44471, 55874, 70092, 87432, 108881, 134951, 166948, 205678, 252951, 309908, 379032, 462046, 562246, 682130
Offset: 0

Views

Author

Andrew Howroyd, Jan 12 2024

Keywords

Comments

The minimum containing square of a partition has its side length equal to the number of parts or the size of the largest part whichever is greater. a(n) is the sum of the side lengths over all partitions of n.

Crossrefs

Programs

  • PARI
    a(n)={my(s=0); if(n, forpart(p=n, s += max(#p, p[#p]))); s}

Formula

a(n) = Sum_{k>=1} k*A096771(n,k).
Showing 1-2 of 2 results.