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.

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

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

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