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.

A116686 Total number of parts smaller than the largest part, in all partitions of n.

Original entry on oeis.org

0, 0, 1, 3, 8, 15, 29, 48, 79, 123, 188, 276, 404, 575, 808, 1122, 1540, 2089, 2811, 3748, 4958, 6519, 8504, 11034, 14231, 18268, 23312, 29638, 37486, 47245, 59279, 74140, 92347, 114703, 141933, 175174, 215478, 264407, 323448, 394788, 480509, 583609
Offset: 1

Views

Author

Emeric Deutsch, Feb 23 2006

Keywords

Comments

Also, sum over all partitions of n of the difference between the largest part and the smallest part. - Franklin T. Adams-Watters, Feb 29 2008
Row sums of A244966. - Omar E. Pol, Jul 19 2014

Examples

			a(5) = 8 because the partitions of 5 are [5], [4,(1)], [3,(2)], [3,(1),(1)], [2,2,(1)], [2,(1),(1),(1)] and [1,1,1,1,1], containing a total of 8 parts that are smaller than the largest part (shown between parentheses).
		

Crossrefs

Programs

  • Maple
    f:=sum(x^i*sum(x^j/(1-x^j),j=1..i-1)/product(1-x^q,q=1..i),i=2..55): fser:=series(f,x=0,50): seq(coeff(fser,x^n),n=1..47);
  • Mathematica
    Table[Length[Flatten[Rest[Split[#]]&/@Select[IntegerPartitions[n], #[[1]]> #[[-1]]&]]],{n,50}] (* Harvey P. Dale, Jul 26 2016 *)

Formula

a(n) = Sum_{k>=0} k*A116685(n,k).
G.f.: Sum_{i>=1} (x^i*(Sum_{j=1..i-1} x^j/(1-x^j))/(Product_{q=1..i} (1-x^q))).
a(n) = A006128(n) - A046746(n). - Vladeta Jovovic, Feb 24 2006
a(n) = A211870(n) + A211881(n). - Alois P. Heinz, Feb 13 2013

A211881 Difference between sum of largest parts and sum of smallest parts of all partitions of n into an even number of parts.

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 9, 16, 26, 41, 65, 95, 142, 202, 293, 403, 568, 766, 1054, 1399, 1886, 2469, 3276, 4237, 5538, 7094, 9162, 11628, 14856, 18704, 23670, 29590, 37130, 46109, 57428, 70885, 87685, 107634, 132324, 161595, 197545, 240091, 291990, 353302, 427624
Offset: 0

Views

Author

Alois P. Heinz, Feb 13 2013

Keywords

Examples

			a(6) = 9: partitions of 6 into an even number of parts are [1,1,1,1,1,1], [2,2,1,1], [3,1,1,1], [3,3], [4,2], [5,1], difference between sum of largest parts and sum of smallest parts is (1+2+3+3+4+5) - (1+1+1+3+2+1) = 18 - 9 = 9.
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i) option remember; [`if`(n=i, n, 0), 0]+
          `if`(i>n, [0, 0], g(n, i+1)+(l-> [l[2], l[1]])(g(n-i, i)))
        end:
    b:= proc(n, i) option remember;
          [`if`(n=i, n, 0), 0]+`if`(i<1, [0, 0], b(n, i-1)+
           `if`(n [l[2], l[1]])(b(n-i, i))))
        end:
    a:= n-> g(n, 1)[2] -b(n, n)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    g[n_, i_] := g[n, i] = {If[n==i, n, 0], 0} + If[i>n, {0, 0}, g[n, i+1] + Reverse[g[n-i, i]]]; b[n_, i_] := b[n, i] = {If[n==i, n, 0], 0} + If[i<1, {0, 0}, b[n, i-1] + If[nJean-François Alcover, Feb 15 2017, translated from Maple *)

Formula

a(n) = A222048(n) - A222045(n).
a(n) = A116686(n) - A211870(n).
Showing 1-2 of 2 results.