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-10 of 11 results. Next

A097364 Triangle read by rows, 0 <= k < n: T(n,k) = number of partitions of n such that the differences between greatest and smallest parts are k.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 09 2004

Keywords

Comments

Sum_{k=0..n-1} T(n,k) = A000041(n); T(n,0) + T(n,1) = n for n > 1;
T(n,0) = A000005(n); T(n,1) = A049820(n) for n > 1;
T(n,2) = floor((n-2)/2)*(floor((n-2)/2) + 1)/2 = A000217(floor((n-2)/2)) = A008805(n-4) for n > 3.
Without the 0's (which are of no consequence for the triangle) this sequence is A116685. - Emeric Deutsch, Feb 23 2006

Examples

			Triangle starts:
01:  1
02:  2  0
03:  2  1  0
04:  3  1  1  0
05:  2  3  1  1  0
06:  4  2  3  1  1  0
07:  2  5  3  3  1  1 0
08:  4  4  6  3  3  1 1 0
09:  3  6  6  7  3  3 1 1 0
10:  4  6 10  7  7  3 3 1 1 0
11:  2  9 10 12  8  7 3 3 1 1 0
12:  6  6 15 14 13  8 7 3 3 1 1 0
13:  2 11 15 20 16 14 8 7 3 3 1 1 0
14:  4 10 21 22 24 17 ...
- _Joerg Arndt_, Feb 22 2014
T(8,0)=4: 8=4+4=2+2+2+2=1+1+1+1+1+1+1+1,
T(8,1)=4: 3+3+2=2+2+2+1+1=2+2+1+1+1+1=2+1+1+1+1+1+1,
T(8,2)=6: 5+3=4+2+2=3+3+1+1=3+2+2+1=3+2+1+1+1=3+1+1+1+1+1,
T(8,3)=3: 4+3+1=4+2+1+1=4+1+1+1+1,
T(8,4)=3: 6+2=5+2+1=5+1+1+1,
T(8,5)=1: 6+1+1,
T(8,6)=1: 7+1,
T(8,7)=0;
Sum_{k=0..7} T(8,k) = 4+4+6+3+3+1+1+0 = 22 = A000041(8).
		

Crossrefs

Cf. A116685 (same sequence with zeros omitted).
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

  • Haskell
    a097364 n k = length [qs | qs <- pss !! n, last qs - head qs == k] where
       pss = [] : map parts [1..] where
             parts x = [x] : [i : ps | i <- [1..x],
                                       ps <- pss !! (x - i), i <= head ps]
    a097364_row n = map (a097364 n) [0..n-1]
    a097364_tabl = map a097364_row [1..]
    -- Reinhard Zumkeller, Feb 01 2013
  • Maple
    g:=sum(x^i/(1-x^i)/product(1-t*x^j,j=1..i-1),i=1..50): gser:=simplify(series(g,x=0,18)): for n from 1 to 15 do P[n]:=coeff(gser,x^n) od: 1; for n from 2 to 15 do seq(coeff(P[n],t,j),j=0..n-1) od;
    # yields sequence in triangular form # Emeric Deutsch, Feb 23 2006
  • Mathematica
    rows = 14; max = rows+2; col[k0_ /; k0 > 0] := col[k0] = Sum[x^(2*k + k0) / Product[(1-x^(k+j)), {j, 0, k0}], {k, 1, Ceiling[max/2]}] + O[x]^max // CoefficientList[#, x]&; col[0] := Table[Switch[n, 1, 0, 2, 1, , n - 1 - col[1][[n]]], {n, 1, Length[col[1]]}]; Table[col[k][[n+2]], {n, 0, rows-1 }, {k, 0, n}] // Flatten (* _Jean-François Alcover, Sep 10 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{i>=1} x^i/((1 - x^i)*Product_{j=1..i-1} (1 - t*x^j)). - Emeric Deutsch, Feb 23 2006

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

A128508 Number of partitions p of n such that max(p) - min(p) = 3.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 3, 7, 7, 12, 14, 20, 22, 32, 34, 45, 51, 63, 69, 87, 93, 112, 124, 144, 156, 184, 196, 225, 245, 275, 295, 335, 355, 396, 426, 468, 498, 552, 582, 637, 679, 735, 777, 847, 889, 960, 1016, 1088, 1144, 1232, 1288, 1377, 1449, 1539, 1611, 1719
Offset: 0

Views

Author

John W. Layman, May 07 2007

Keywords

Comments

See A008805 and A049820 for the numbers of partitions p of n such that max(p)-min(p)=1 or 2, respectively.

Crossrefs

Programs

  • Mathematica
    np[n_]:=Length[Select[IntegerPartitions[n],Max[#]-Min[#]==3&]]; Array[np,60] (* Harvey P. Dale, Jul 02 2012 *)

Formula

Conjecture. a(1)=0 and, for n>1, a(n+1)=a(n)+d(n), where d(n) is defined as follows: d=0,0,0,1,0 for n=1,...,5 and, for n>5, d(n)=d(n-2)+1 if n=6k or n=6k+4, d(n)=d(n-2) if n=6k+1 or n=6k+3, d(n)=d(n-2)+2Floor[n/6] if n=6k+2 and d(n)=d(n-5) if n=6k+5.
G.f. for number of partitions p of n such that max(p)-min(p) = m is Sum_{k>0} x^(2*k+m)/Product_{i=0..m} (1-x^(k+i)). - Vladeta Jovovic, Jul 04 2007
a(n) = A097364(n,3) = A116685(n,3) = A117143(n) - A117142(n). - Alois P. Heinz, Nov 02 2012

Extensions

More terms from Vladeta Jovovic, Jul 04 2007

A218567 Number of partitions p of n such that max(p)-min(p) = 4.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 13, 16, 24, 27, 40, 46, 60, 71, 92, 103, 131, 149, 181, 206, 247, 275, 329, 366, 424, 474, 548, 601, 690, 759, 858, 942, 1059, 1152, 1293, 1404, 1555, 1690, 1869, 2013, 2218, 2390, 2614, 2812, 3066, 3282, 3574, 3820, 4131, 4415, 4769, 5071
Offset: 6

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+4)/Product_{j=0..4} (1-x^(k+j)).
a(n) = A097364(n,4) = A116685(n,4) = A194621(n,4) - A194621(n,3) = A218506(n) - A117143(n).

A218573 Number of partitions p of n such that max(p) - min(p) = 10.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 35, 53, 67, 93, 119, 161, 201, 267, 332, 428, 531, 674, 824, 1034, 1258, 1552, 1877, 2294, 2749, 3332, 3970, 4762, 5645, 6723, 7916, 9367, 10974, 12894, 15036, 17571, 20381, 23696, 27370, 31652, 36416, 41926, 48029, 55071, 62860
Offset: 12

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+10)/Product_{j=0..10} (1-x^(k+j)).
a(n) = A097364(n,10) = A116685(n,10) = A194621(n,10) - A194621(n,9) = A218512(n) - A218511(n).

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

Original entry on oeis.org

1, 2, 2, 1, 3, 2, 2, 4, 1, 4, 5, 2, 2, 8, 4, 1, 4, 9, 7, 2, 3, 12, 10, 4, 1, 4, 14, 15, 7, 2, 2, 17, 20, 12, 4, 1, 6, 18, 27, 17, 7, 2, 2, 23, 33, 26, 12, 4, 1, 4, 24, 44, 35, 19, 7, 2, 4, 27, 51, 49, 28, 12, 4, 1, 5, 30, 64, 63, 41, 19, 7, 2, 2
Offset: 1

Views

Author

Emeric Deutsch, Nov 21 2015

Keywords

Comments

T(n,k) = number of partitions of n in which the 2nd largest part is k (0 if all parts are equal). Example: T(7,2) = 4 because we have [3,2,1,1], [3,2,2], [4,2,1], and [5,2].
The fact that the above two statistics (in Name and in 1st Comment) have the same distribution follows at once by conjugation. - Emeric Deutsch, Dec 11 2015
Row sums yield the partition numbers (A000041).
T(n,0) = A000005(n) = number of divisors of n.
Sum_{k>=0} k*T(n,k) = A182984(n).

Examples

			T(7,2) = 4 because we have [2,2,1,1,1], [3,2,1,1], [3,3,1], and [4,2,1].
Triangle starts:
1;
2;
2,1;
3,2;
2,4,1;
4,5,2;
2,8,4,1;
		

Crossrefs

Programs

  • Maple
    g := sum(x^i/((1-x^i)*(product(1-t*x^j, j = i+1 .. 100))), i = 1 .. 100): gser := simplify(series(g, x = 0, 30)): for n to 27 do P[n] := sort(coeff(gser, x, n)) end do: for n to 27 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(i<1, 0, b(n, i-1) +add((p->[0, p[1]+
           expand(p[2]*x^j)])(b(n-i*j, i-1)) , j=1..n/i)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)[2]):
    seq(T(n), n=1..20);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, b[n, i-1] + Sum[ Function[p, {0, p[[1]] + Expand[p[[2]]*x^j]}][b[n-i*j, i-1]], {j, 1, n/i} ]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n][[2]]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Sum_{i>=1} (x^i/((1 - x^i)*Product_{j>=i+1}(1-t*x^j))).

A218568 Number of partitions p of n such that max(p)-min(p) = 5.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 17, 26, 31, 45, 54, 73, 87, 114, 135, 171, 200, 249, 290, 352, 406, 487, 560, 660, 752, 879, 997, 1153, 1298, 1489, 1671, 1900, 2121, 2397, 2665, 2992, 3311, 3701, 4081, 4535, 4982, 5514, 6042, 6655, 7265, 7977, 8686, 9502, 10314, 11248
Offset: 7

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+5)/Product_{j=0..5} (1-x^(k+j)).
a(n) = A097364(n,5) = A116685(n,5) = A194621(n,5) - A194621(n,4) = A218507(n) - A218506(n).

A218569 Number of partitions p of n such that max(p)-min(p) = 6.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 27, 33, 49, 59, 81, 100, 131, 158, 205, 243, 306, 365, 448, 527, 642, 748, 896, 1042, 1231, 1418, 1667, 1906, 2215, 2527, 2909, 3298, 3781, 4260, 4847, 5446, 6158, 6886, 7756, 8633, 9669, 10738, 11970, 13239, 14713, 16212, 17943
Offset: 8

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+6)/Product_{j=0..6} (1-x^(k+j)).
a(n) = A097364(n,6) = A116685(n,6) = A194621(n,6) - A194621(n,5) = A218508(n) - A218507(n).

A218570 Number of partitions p of n such that max(p)-min(p) = 7.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 34, 51, 63, 86, 108, 144, 175, 229, 278, 351, 425, 529, 630, 775, 919, 1109, 1309, 1565, 1827, 2167, 2518, 2952, 3414, 3975, 4563, 5281, 6036, 6931, 7889, 9012, 10200, 11598, 13078, 14785, 16613, 18704, 20925, 23470, 26174, 29229
Offset: 9

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

  • Mathematica
    terms = 49; offset = 9; max = terms + offset; s[k0_ /; k0 > 0] := Sum[x^(2*k + k0)/Product[ (1 - x^(k + j)), {j, 0, k0}], {k, 1, Ceiling[max/2]}] + O[x]^max // CoefficientList[#, x] &; Drop[s[7], offset] (* Jean-François Alcover, Sep 11 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>0} x^(2*k+7)/Product_{j=0..7} (1-x^(k+j)).
a(n) = A097364(n,7) = A116685(n,7) = A194621(n,7) - A194621(n,6) = A218509(n) - A218508(n).

A218571 Number of partitions p of n such that max(p)-min(p) = 8.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 35, 52, 65, 90, 113, 152, 188, 246, 302, 387, 471, 591, 714, 884, 1059, 1292, 1538, 1857, 2193, 2621, 3077, 3646, 4254, 4999, 5801, 6772, 7815, 9062, 10409, 12002, 13719, 15733, 17909, 20438, 23169, 26318, 29722, 33623, 37833
Offset: 10

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

  • Mathematica
    terms = 48; offset = 10; max = terms + offset; s[k0_ /; k0 > 0] := Sum[x^(2*k + k0)/Product[ (1 - x^(k + j)), {j, 0, k0}], {k, 1, Ceiling[max/2]}] + O[x]^max // CoefficientList[#, x] &; Drop[s[8], offset] (* Jean-François Alcover, Sep 11 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>0} x^(2*k+8)/Product_{j=0..8} (1-x^(k+j)).
a(n) = A097364(n,8) = A116685(n,8) = A194621(n,8) - A194621(n,7) = A218510(n) - A218509(n).
Showing 1-10 of 11 results. Next