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

A116685 Triangle read by rows: T(n,k) is number of partitions of n that have k parts smaller than the largest part (n>=1, k>=0).

Original entry on oeis.org

1, 2, 2, 1, 3, 1, 1, 2, 3, 1, 1, 4, 2, 3, 1, 1, 2, 5, 3, 3, 1, 1, 4, 4, 6, 3, 3, 1, 1, 3, 6, 6, 7, 3, 3, 1, 1, 4, 6, 10, 7, 7, 3, 3, 1, 1, 2, 9, 10, 12, 8, 7, 3, 3, 1, 1, 6, 6, 15, 14, 13, 8, 7, 3, 3, 1, 1, 2, 11, 15, 20, 16, 14, 8, 7, 3, 3, 1, 1, 4, 10, 21, 22, 24, 17, 14, 8, 7, 3, 3, 1, 1, 4, 11, 21
Offset: 1

Views

Author

Emeric Deutsch, Feb 23 2006

Keywords

Comments

Same as A097364 without the 0's.
Also number of partitions of n such that the difference between the largest and smallest parts is k (see A097364). Example: T(6,2)=3 because we have [4,2],[3,2,1] and [3,1,1,1].
Row 1 has one term; row n (n>=2) has n-1 terms.
Row sums yield the partition numbers (A000041).
T(n,0)=A000005(n) (number of divisors of n).
T(n,1)=A049820(n) (n minus number of divisors of n).
T(n,2)=A008805(n-4) for n>=4.
Sum(k*T(n,k),k=0..n-2)=A116686

Examples

			Triangle starts:
01:  1
02:  2
03:  2  1
04:  3  1  1
05:  2  3  1  1
06:  4  2  3  1  1
07:  2  5  3  3  1  1
08:  4  4  6  3  3  1 1
09:  3  6  6  7  3  3 1 1
10:  4  6 10  7  7  3 3 1 1
11:  2  9 10 12  8  7 3 3 1 1
12:  6  6 15 14 13  8 7 3 3 1 1
13:  2 11 15 20 16 14 8 7 3 3 1 1
14:  4 10 21 22 24 17 ...
T(6,2)=3 because we have [4,1,1],[3,2,1] and [2,2,1,1].
		

Crossrefs

Columns k=3-10 give: A128508, A218567, A218568, A218569, A218570, A218571, A218572, A218573. T(2*n,n) = A117989(n). - Alois P. Heinz, Nov 02 2012

Programs

Formula

G.f.: sum(i>=1, x^i/(1-x^i)/prod(j=1..i-1, 1-t*x^j) ).

A182984 Total number of parts that are not the smallest part in all partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 2, 6, 9, 19, 29, 48, 73, 114, 161, 241, 340, 479, 662, 917, 1237, 1678, 2231, 2965, 3901, 5114, 6629, 8588, 11036, 14129, 17983, 22823, 28790, 36238, 45381, 56674, 70502, 87453, 108077, 133259, 163762, 200747, 245378, 299261
Offset: 0

Views

Author

Omar E. Pol, Jul 15 2011

Keywords

Comments

a(n) = sum of 2nd largest part in all partitions of n (if all parts are equal, then we assume that 0 is also a part). Example: a(5) = 6 because the sum of the 2nd largest parts in the partitions [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1] is 0 + 1 + 2 + 1 + 1 + 1 + 0 = 6. - Emeric Deutsch, Dec 11 2015

Examples

			a(5) = 6 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 6 parts that are not the smallest part (shown between parentheses).
		

Crossrefs

Programs

  • Maple
    g := sum((sum(x^(q+i)/(1-x^q), q = i+1 .. 80))/(product(1-x^q, q = i .. 80)), i = 1 .. 80): gser := series(g, x = 0,50): seq(coeff(gser, x, n), n = 0 .. 47); # Emeric Deutsch, Nov 14 2015

Formula

a(n) = A006128(n) - A092269(n), for n >= 1.
G.f.: g(x) = Sum(Sum(x^{q+i}/(1-x^q), q=i+1..infinity)/Product(1-x^q, q=i..infinity), i=1..infinity). - Emeric Deutsch, Nov 14 2015
a(n) = Sum(k*A264402(n,k), k>=1). - Emeric Deutsch, Dec 11 2015

A182977 Total number of parts that are neither the smallest part nor the largest part in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 6, 12, 22, 39, 66, 103, 159, 243, 352, 510, 721, 1011, 1391, 1903, 2557, 3436, 4549, 5999, 7824, 10187, 13132, 16886, 21544, 27414, 34657, 43703, 54797, 68558, 85328, 105963, 131028, 161664, 198710
Offset: 0

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 counts.
3 + 1 + 1 + 1
2 + 2 + 2
2 + 2 + 1 + 1
2 + 1 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1 + 1
There is only one part which is neither the smallest part nor the largest part in all partitions of 6, so a(6) = 1.
		

Crossrefs

Programs

  • Maple
    g := add(add((add(x^(i+j+k)/(1-x^k), k = i+1 .. j-1))/(mul(1-x^k, k = i .. j)), j = i+1 .. 80), i = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # Emeric Deutsch, Dec 25 2015

Formula

a(n) = A006128(n) - A182978(n).
G.f.: g(x) = Sum_{i>=1} Sum_{j>=i+1} (Sum_{k=i+1..j-1} x^{i+j+k}/(1-x^k)/Product_{k=i..j}(1-x^k)). - Emeric Deutsch, Dec 25 2015
a(n) = Sum_{k>=0} k*A265249(n,k). - Emeric Deutsch, Dec 25 2015

Extensions

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

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

A211870 Difference between sum of largest parts and sum of smallest parts of all partitions of n into an odd number of parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 6, 13, 22, 38, 58, 93, 134, 202, 282, 405, 554, 774, 1035, 1412, 1862, 2489, 3243, 4267, 5496, 7137, 9106, 11684, 14782, 18782, 23575, 29689, 37010, 46238, 57275, 71048, 87489, 107844, 132083, 161853, 197243, 240418, 291619, 353702, 427167
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2013

Keywords

Examples

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

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)[1] -b(n, n)[1]:
    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 16 2017, translated from Maple *)

Formula

a(n) = A222047(n) - A222044(n).
a(n) = A116686(n) - A211881(n).

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).

A244966 Triangle read by rows: T(n,k) is the difference between the largest and the smallest part of the k-th partition in the list of colexicographically ordered partitions of n, with n>=1 and 1<=k<=p(n), where p(n) is the number of partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 1, 3, 1, 0, 0, 1, 2, 1, 3, 2, 4, 0, 2, 0, 0, 0, 1, 2, 1, 3, 2, 4, 1, 3, 2, 5, 1, 3, 1, 0, 0, 1, 2, 1, 3, 2, 4, 1, 3, 2, 5, 2, 4, 3, 6, 0, 2, 1, 4, 2, 0, 0, 0, 1, 2, 1, 3, 2, 4, 1, 3, 2, 5, 2, 4, 3, 6, 1, 3, 2, 5, 4, 3, 7, 1, 3, 2, 5, 0, 3, 1, 0
Offset: 1

Views

Author

Omar E. Pol, Jul 18 2014

Keywords

Comments

The number of t's in row n gives A097364(n,t), with n>=1 and 0<=t
Rows converge to A244967, which is A141285 - 1.
Row n has length A000041(n).
Row sums give A116686.

Examples

			Triangle begins:
0;
0, 0;
0, 1, 0;
0, 1, 2, 0, 0;
0, 1, 2, 1, 3, 1, 0;
0, 1, 2, 1, 3, 2, 4, 0, 2, 0, 0;
0, 1, 2, 1, 3, 2, 4, 1, 3, 2, 5, 1, 3, 1, 0;
0, 1, 2, 1, 3, 2, 4, 1, 3, 2, 5, 2, 4, 3, 6, 0, 2, 1, 4, 2, 0, 0;
...
For n = 6 we have:
--------------------------------------------------------
.                        Largest  Smallest   Difference
k    Partition of 6        part     part       T(6,k)
--------------------------------------------------------
1:  [1, 1, 1, 1, 1, 1]      1    -    1     =     0
2:  [2, 1, 1, 1, 1]         2    -    1     =     1
3:  [3, 1, 1, 1]            3    -    1     =     2
4:  [2, 2, 1, 1]            2    -    1     =     1
5:  [4, 1, 1]               4    -    1     =     3
6:  [3, 2, 1]               3    -    1     =     2
7:  [5, 1]                  5    -    1     =     4
8:  [2, 2, 2]               2    -    2     =     0
9:  [4, 2]                  4    -    2     =     2
10: [3, 3]                  3    -    3     =     0
11: [6]                     6    -    6     =     0
--------------------------------------------------------
So the 6th row of triangle is [0,1,2,1,3,2,4,0,2,0,0] and the row sum is A116686(6) = 15.
Note that in the 6th row there are four 0's so A097364(6,0) = 4, there are two 1's so A097364(6,1) = 2, there are three 2's so A097364(6,2) = 3, there is only one 3 so A097364(6,3) = 1, there is only one 4 so A097364(6,4) = 1 and there are no 5's so A097364(6,5) = 0.
		

Formula

T(n,k) = A141285(k) - A196931(n,k), n>=1, 1<=k<=A000041(n).
Showing 1-7 of 7 results.