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

A220477 Total number of parts in all partitions of n with at least one distinct part.

Original entry on oeis.org

0, 0, 2, 5, 14, 23, 46, 71, 115, 174, 263, 371, 542, 756, 1044, 1432, 1947, 2605, 3478, 4588, 6020, 7863, 10182, 13114, 16820, 21480, 27254, 34489, 43423, 54491, 68103, 84864, 105318, 130408, 160828, 197923, 242774, 297141, 362531, 441456, 536062, 649695
Offset: 1

Views

Author

Omar E. Pol, Jan 16 2013

Keywords

Comments

Also total number of parts in all partitions of n minus the sum of divisors of n. Also sum of largest parts of all partitions of n minus the sum of divisors of n.

Examples

			For n = 6
-----------------------------------------------------
Partitions of 6            Value
-----------------------------------------------------
6 .......................... 0  (all parts are equal)
5 + 1 ...................... 2
4 + 2 ...................... 2
4 + 1 + 1 .................. 3
3 + 3 ...................... 0  (all parts are equal)
3 + 2 + 1 .................. 3
3 + 1 + 1 + 1 .............. 4
2 + 2 + 2 .................. 0  (all parts are equal)
2 + 2 + 1 + 1 .............. 4
2 + 1 + 1 + 1 + 1 .......... 5
1 + 1 + 1 + 1 + 1 + 1 ...... 0  (all parts are equal)
-----------------------------------------------------
The sum of the values is    23
On the other hand the total number of parts of the partitions of 6 is A006128(6) = 35 and the sum of divisor of 6 is 1 + 2 + 3 + 6 = sigma(6) = A000203(6) = 12 equals the total number of parts of the partitions of 6 into equal parts. So a(6) = 35 - 12 = 23.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f, g:= b(n, i-1), `if`(i>n, [0$2], b(n-i, i));
             [f[1]+g[1], f[2]+g[2] +g[1]]
          fi
        end:
    a:= n-> b(n, n)[2] -numtheory[sigma](n):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jan 17 2013
  • Mathematica
    a[n_] := Sum[DivisorSigma[0, k]*PartitionsP[n-k], {k, 1, n}] - DivisorSigma[1, n]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 22 2015 *)

Formula

a(n) = A006128(n) - A000203(n).
G.f.: Q(0)/(1-x), where Q(k)= 1 - prod(n=1..k+1, (1-x^n))/( 1 - (x^(k+1)) - x*(1- (x^(k+1)))^2*(k+2)/( x*(1- (x^(k+1)))*(k+2) - (k+1)*(1 - (x^(k+2)))*prod(n=1..k+1, (1-x^n) )/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 16 2013

A182978 Total number of parts that are the smallest part or the largest part in all partitions of n.

Original entry on oeis.org

1, 3, 6, 12, 20, 34, 52, 80, 116, 170, 236, 333, 453, 621, 825, 1111, 1455, 1923, 2487, 3239, 4149, 5342, 6770, 8625, 10852, 13698, 17107, 21413, 26567, 33019, 40721, 50270, 61663, 75665, 92318, 112686, 136849, 166173, 200923, 242836
Offset: 1

Views

Author

Omar E. Pol, Jul 17 2011

Keywords

Examples

			For n = 6 the partitions of 6 are
6
5 + 1
4 + 2
4 + 1 + 1
3 + 3
3 + (2) + 1 .... the "2" is the part that does not count.
3 + 1 + 1 + 1
2 + 2 + 2
2 + 2 + 1 + 1
2 + 1 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1 + 1
The total number of parts in all partitions of 6 is equal to 35. All parts are the smallest part or the largest part, except the "2" in the partition (3 + 2 + 1), so a(6) = 35 - 1 = 34.
		

Crossrefs

Programs

  • Maple
    l:= proc(n, i) option remember; `if`(n=i, n, 0)+
          `if`(i<1, 0, l(n, i-1) +`if`(n l(n, n) +s(n, n) -numtheory[sigma](n):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jan 17 2013
  • Mathematica
    l[n_, i_] := l[n, i] = If[n==i, n, 0] + If[i<1, 0, l[n, i-1] + If[nJean-François Alcover, Nov 03 2015, after Alois P. Heinz *)

Formula

a(n) = A006128(n) - A182977(n).

Extensions

a(12) corrected and more terms a(13)-a(40) from David Scambler, Jul 18 2011

A265249 Triangle read by rows: T(n,k) is the number of partitions of n having k parts strictly between the smallest and the largest part (n>=1, k>=0).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 1, 13, 2, 17, 4, 1, 20, 8, 2, 26, 11, 4, 1, 29, 17, 8, 2, 35, 24, 13, 4, 1, 39, 33, 19, 8, 2, 48, 39, 30, 13, 4, 1, 48, 56, 41, 21, 8, 2, 60, 64, 57, 32, 13, 4, 1, 61, 83, 75, 47, 21, 8, 2, 74, 94, 100, 65, 34, 13, 4, 1
Offset: 1

Views

Author

Emeric Deutsch, Dec 25 2015

Keywords

Comments

Number of entries in row n is floor((n-4)/2) (n>=4).
Sum of entries of row n = A000041(n) = number of partitions of n.
T(n,0) = A265250(n).
Sum(k*T(n,k), k>=0) = A182977(n).

Examples

			T(8,2) = 1 because among the 22 partitions of 8 only [3,2,2,1] has 2 parts strictly between the smallest and the largest part.
Triangle starts:
1;
2;
3;
5;
7;
10, 1;
13, 2;
		

Crossrefs

Programs

  • Maple
    g := add(x^i/(1-x^i), i=1..80)+add(add(x^(i+j)/((1-x^i)*(1-x^j)*mul(1-t*x^k, k=i+1..j-1)),j=i+1..80),i=1..80): gser := simplify(series(g,x=0,23)): for n to 22 do P[n]:= sort(coeff(gser,x,n)) end do: for n to 22 do seq(coeff(P[n],t,k), k=0..degree(P[n])) end do; # yields sequence in triangular form

Formula

G.f.: G(t,x) = Sum_{i>=1} x^i/(1-x^i) + Sum_{i>=1} Sum_{j>=i+1} x^(i+j)/(1-x^i)/(1-x^j)/Product_{k=i+1..j-1} (1-tx^k).
Showing 1-3 of 3 results.