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

A008284 Triangle of partition numbers: T(n,k) = number of partitions of n in which the greatest part is k, 1 <= k <= n. Also number of partitions of n into k positive parts, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 5, 5, 3, 2, 1, 1, 1, 4, 7, 6, 5, 3, 2, 1, 1, 1, 5, 8, 9, 7, 5, 3, 2, 1, 1, 1, 5, 10, 11, 10, 7, 5, 3, 2, 1, 1, 1, 6, 12, 15, 13, 11, 7, 5, 3, 2, 1, 1, 1, 6, 14, 18, 18, 14, 11, 7, 5, 3, 2, 1, 1, 1, 7, 16, 23, 23, 20, 15, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

From Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010: (Start)
A000041(n+1) = 1 + Sum_{r=1..n} Sum_{k=1..min(r,n-r+1)} T(r,k).
T(n, n-k) is also the number of partitions of k in which the greatest part is at most n-k. (End)
From Richard R. Forberg, Dec 26 2014: (Start)
Elements of T(n, k) for n <= 2+3k, equal A000041(n-k) - A000070(n-2k-1), with the assumption A000070(n) = 0 for n < 0.
The diagonal T(2+2k, k), for k > 1 equals A007042, and the diagonal T(3+3k,k), for k >= 1, equals A104384. (End)
T(-n, k) is used as a definition for A380038, which can therefore be seen as an extension of this sequence for negative n. - Friedjof Tellkamp, Jan 18 2025

Examples

			The triangle T(n,k) begins:
   n\k 1  2  3  4  5  6  7  8  9 10 11 12 ...
   1:  1
   2:  1  1
   3:  1  1  1
   4:  1  2  1  1
   5:  1  2  2  1  1
   6:  1  3  3  2  1  1
   7:  1  3  4  3  2  1  1
   8:  1  4  5  5  3  2  1  1
   9:  1  4  7  6  5  3  2  1  1
  10:  1  5  8  9  7  5  3  2  1  1
  11:  1  5 10 11 10  7  5  3  2  1  1
  12:  1  6 12 15 13 11  7  5  3  2  1  1
... Reformatted and extended by _Wolfdieter Lang_, Dec 03 2012; additional extension by _Bob Selcoe_, Jun 09 2013
T(7,3) = 4 because we have [3,3,1], [3,2,2], [3,2,1,1] and [3,1,1,1,1], each having greatest part 3; or [5,1,1], [4,2,1], [3,3,1] and [3,2,2] each having 3 parts.
* Example from formula above: T(10,4) = 9 because T(6,4) + T(6,3) + T(6,2) + T(6,1) = 2 + 3 + 3 + 1 = 9.
* P(n) = P(n-1) + DT(n-1). P(n) = unordered partitions of n. (A000041) DT(n-1) = sum of diagonals beginning at T(n-1,1).
Example P(11) = 56, P(10) = 42, sum DT(10) = 1 + 4 + 5 + 3 + 1 = 14. - _Bob Selcoe_, Jun 09 2013
From _Omar E. Pol_, Nov 19 2019: (Start)
Illustration of initial terms: T(n,k) is also the number of vertical line segments in the k-th column of the n-th diagram, which represents the partitions of n:
.
    1    1 1    1 1 1    1 2 1 1    1 2 2 1 1    1 3 3 2 1 1    1 3 4 3 2 1 1
.
   _|   _| |   _| | |   _| | | |   _| | | | |   _| | | | | |   _| | | | | | |
        _ _|   _ _| |   _ _| | |   _ _| | | |   _ _| | | | |   _ _| | | | | |
               _ _ _|   _ _ _| |   _ _ _| | |   _ _ _| | | |   _ _ _| | | | |
                        _ _|   |   _ _|   | |   _ _|   | | |   _ _|   | | | |
                        _ _ _ _|   _ _ _ _| |   _ _ _ _| | |   _ _ _ _| | | |
                                   _ _ _|   |   _ _ _|   | |   _ _ _|   | | |
                                   _ _ _ _ _|   _ _ _ _ _| |   _ _ _ _ _| | |
                                                _ _|   |   |   _ _|   |   | |
                                                _ _ _ _|   |   _ _ _ _|   | |
                                                _ _ _|     |   _ _ _|     | |
                                                _ _ _ _ _ _|   _ _ _ _ _ _| |
                                                               _ _ _|   |   |
                                                               _ _ _ _ _|   |
                                                               _ _ _ _|     |
                                                               _ _ _ _ _ _ _|
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 94, 96 and 307.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 219.
  • D. E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions, Addison-Wesley Professional, 2005, pp. 38, 45, 50 [From Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010]
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.4, p. 400.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIV.2, p. 493.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 294.

Crossrefs

A000041 is row sums and diagonal.
Partial sums of rows gives A026820.
Read from right to left gives A058398.
Subtriangle of A072233 without row n=0 and column m=0.
Cf. A007042, A104384 which are diagonals with slope -2, -3.

Programs

  • Haskell
    a008284 n k = a008284_tabl !! (n-1) !! (k-1)
    a008284_row n = a008284_tabl !! (n-1)
    a008284_tabl = [1] : f [[1]] where
       f xss = ys : f (ys : xss) where
         ys = (map sum $ zipWith take [1..] xss) ++ [1]
    -- Reinhard Zumkeller, Sep 05 2014
    
  • Maple
    G:=-1+1/product(1-t*x^j,j=1..15): Gser:=simplify(series(G,x=0,17)): for n from 1 to 14 do P[n]:=coeff(Gser,x^n) od: for n from 1 to 14 do seq(coeff(P[n],t^j),j=1..n) od; # yields sequence in triangular form; Emeric Deutsch, Feb 12 2006
    with(combstruct):for n from 0 to 18 do seq(count(Partition(n), size=m), m = 1 .. n) od; # Zerinvary Lajos, Mar 30 2009
    T := proc(n,k) option remember; if k < 0 or n < 0 then 0 elif k = 0 then if n = 0 then 1 else 0 fi else T(n - 1, k - 1) + T(n - k, k) fi end: seq(print(seq(T(n, k), k=1..n)),n=1..14); # Peter Luschny, Jul 24 2011
  • Mathematica
    Column[Table[ IntegerPartitions[n, {k}] // Length, {n, 1, 20}, {k, 1, n}], Center] (* Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010 *)
    (*Recurrence closely related to natural numbers and number of divisors of n*)
    Clear[t]; nn = 14; t[n_, 1] = 1; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, n - 1}] - Sum[t[n - i, k], {i, 1, k - 1}], 0];Flatten[Table[Table[t[n, k], {k, 1, n}], {n, 1, nn}]][[1 ;; 96]] (* Mats Granvik, Jan 01 2015 *)
    Table[SeriesCoefficient[1/QPochhammer[a q, q], {q, 0, n}, {a, 0, k}], {n, 1, 15}, {k, 1, n}] // Column (* Vladimir Reshetnikov, Nov 18 2016 *)
    T[n_, k_] := T[n, k] = If[n>0 && k>0, T[n-1, k-1] + T[n-k, k], Boole[n==0 && k==0]]
    Table[T[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* Robert A. Russell, May 12 2018 after Knuth 7.2.1.4 (39) *)
  • PARI
    T(n,k)=#partitions(n-k,k)
    for(n=1,9,for(k=1,n,print1(T(n,k)", "))) \\ Charles R Greathouse IV, Jan 04 2016
    
  • PARI
    A8284=[]; A008284(n,k)={for(n=#A8284+1,n,A8284=concat(A8284,[vector(n,k,if(2*k1,A8284[n-k][k]+A8284[n-1][k-1],1),numbpart(n-k)))]));if(k,A8284[n][k],A8284[n])} \\ Without 2nd argument, return row n. - M. F. Hasler, Sep 26 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A008284_T(n,k):
        if k==n or k==1: return 1
        if k>n: return 0
        return A008284_T(n-1,k-1)+A008284_T(n-k,k) # Chai Wah Wu, Sep 21 2023
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [[number_of_partitions_length(n, k) for k in (1..n)] for n in (1..12)] # Peter Luschny, Aug 01 2015
    

Formula

T(n, k) = Sum_{i=1..k} T(n-k, i), for 1 <= k <= n-1; T(n, n) = 1 for n >= 1.
Or, T(n, 1) = T(n, n) = 1, T(n, k) = 0 (k > n), T(n, k) = T(n-1, k-1) + T(n-k, k).
G.f. for k-th column: x^k/(Product_{j=1..k} (1-x^j)). - Wolfdieter Lang, Nov 29 2000
G.f.: A(x, y) = Product_{n>=1} 1/(1-x^n)^(P_n(y)/n), where P_n(y) = Sum_{d|n} eulerphi(n/d)*y^d. - Paul D. Hanna, Jul 13 2004
If k >= n/2, T(n,k) = T(2(n-k),n-k) = A000041(n-k). - Franklin T. Adams-Watters, Jan 12 2006 [Relation included by Hans Loeblich, Apr 16 2019, relation extended by Evan Robinson, Jun 30 2021]
G.f.: G(t,x) = -1 + 1/Product_{j>=1} (1-t*x^j). - Emeric Deutsch, Feb 12 2006
A002865(n) = Sum_{k=2..floor((n+2)/2)} T(n-k+1,k-1). - Reinhard Zumkeller, Nov 04 2007
A000700(n) = Sum_{k=1..n} (-1)^(n-k) T(n,k). - Jeremy L. Martin, Jul 06 2013
G.f.: -1 + e^(F(x,z)), where F(x,z) = Sum_{n >= 1} (x*z)^n/(n*(1 - z^n)) is a g.f. for A126988. - Peter Bala, Jan 13 2015
Also, T(n, n-k) = k for k = 1, 2, 3; n >= 2k. T(n, 2) = floor(n/2). T(n, 3) = round(n^2/12). - M. F. Hasler, Sep 26 2017
T(n,k) = [n>0 & k>0] * (T(n-1,k-1) + T(n-k,k)) + [n==0 & k==0]. - Robert A. Russell, May 12 2018 from Knuth 7.2.1.4 (39)
T(n, k) = Sum_{i=0..n-1} T(n-ik-1, k-1) for k >= 1; T(-n, k) = 0 for n > 0; T(n, 0) = [n==0]. - Joshua Swanson (writing for Juexian Li), May 24 2020

A022811 Number of terms in n-th derivative of a function composed with itself 3 times.

Original entry on oeis.org

1, 1, 3, 6, 13, 23, 44, 74, 129, 210, 345, 542, 858, 1310, 2004, 2996, 4467, 6540, 9552, 13744, 19711, 27943, 39452, 55172, 76865, 106200, 146173, 199806, 272075, 368247, 496642, 666201, 890602, 1184957, 1571417, 2075058, 2731677, 3582119, 4683595, 6102256
Offset: 0

Views

Author

Winston C. Yang (yang(AT)math.wisc.edu)

Keywords

Comments

This also counts a restricted set of plane partitions of n. Each element of the set which contains the A000041(n) partitions of n can be converted into plane partitions by insertion of line feeds at some or all places of the "pluses." Since the length of rows in plane partitions must be nonincreasing, there are only A000041(L(P)) ways to comply with this rule, where L(P) is the number of terms in that particular partition. Example for n=4: consider all five partitions 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1 of four. The associated a(4)=13 plane partitions are 4, 31, 3|1, 22, 2|2, 211, 21|1, 2|1|1, 1111, 111|1, 11|11, 11|1|1 and 1|1|1|1, where the bar represents start of the next row, where a(4) = A000041(L(4)) + A000041(L(3+1)) + A000041(L(2+2)) + A000041(L(2+1+1))+ A000041(L(1+1+1+1)) = A000041(1) + A000041(2) + A000041(2) + A000041(3) + A000041(4). By construction from sorted partitions, all the plane partitions are strictly decreasing along each row and each column. - R. J. Mathar, Aug 12 2008
Also the number of pairs of integer partitions, the first with sum n and the second with sum equal to the length of the first. - Gus Wiseman, Jul 19 2018

Examples

			From _Gus Wiseman_, Jul 19 2018: (Start)
Using the chain rule, we compute the second derivative of f(f(f(x))) to be the following sum of a(2) = 3 terms.
  d^2/dx^2 f(f(f(x))) =
  f'(f(x)) f'(f(f(x))) f''(x) +
  f'(x)^2 f'(f(f(x))) f''(f(x)) +
  f'(x)^2 f'(f(x))^2 f''(f(f(x))).
(End)
		

References

  • W. C. Yang, Derivatives of self-compositions of functions, preprint, 1997.

Crossrefs

Column k=3 of A022818.
First column of A039805.
A row or column of A081718.

Programs

  • Maple
    A022811 := proc(n) local a,P,p,lp ; a := 0 ; P := combinat[partition](n) ; for p in P do lp := nops(p) ; a := a+combinat[numbpart](lp) ; od: RETURN(a) ; end: for n from 1 do print(n,A022811(n)) ; od: # R. J. Mathar, Aug 12 2008
  • Mathematica
    a[n_] := Total[PartitionsP[Length[#]]& /@ IntegerPartitions[n]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 80}] (* Jean-François Alcover, Apr 28 2017 *)
    Table[Length[1+D[f[f[f[x]]],{x,n}]]-1,{n,10}] (* Gus Wiseman, Jul 19 2018 *)

Formula

If a(n,m) = number of terms in m-derivative of a function composed with itself n times, p(n,k) = number of partitions of n into k parts, then a(n,m) = Sum_{i=0..m} p(m,i)*a(n-1,i).
G.f.: Sum_{k>=0} p(k) * x^k / Product_{j=1..k} (1 - x^j), where p(k) = number of partitions of k. - Ilya Gutkovskiy, Jan 28 2020

Extensions

Typo corrected by Neven Juric, Mar 25 2013

A039807 Matrix 5th power of partition triangle A008284.

Original entry on oeis.org

1, 5, 1, 15, 5, 1, 45, 20, 5, 1, 110, 60, 20, 5, 1, 271, 170, 65, 20, 5, 1, 599, 426, 185, 65, 20, 5, 1, 1309, 1025, 486, 190, 65, 20, 5, 1, 2690, 2299, 1185, 501, 190, 65, 20, 5, 1, 5436, 4999, 2750, 1245, 506, 190, 65, 20, 5, 1, 10545, 10380, 6069, 2910, 1260
Offset: 0

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Examples

			1; 5,1; 15,5,1; 45,20,5,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805, A039806. a(n, 1) = A022813(n) (first column).

A050304 Matrix 10th power of partition triangle A008284.

Original entry on oeis.org

1, 10, 1, 55, 10, 1, 265, 65, 10, 1, 1045, 320, 65, 10, 1, 3817, 1365, 330, 65, 10, 1, 12583, 5127, 1420, 330, 65, 10, 1, 39148, 17710, 5447, 1430, 330, 65, 10, 1, 114235, 56638, 19030, 5502, 1430, 330, 65, 10, 1, 318857, 170993, 61865, 19350, 5512
Offset: 1

Views

Author

Christian G. Bower, Aug 15 1999

Keywords

Examples

			1; 10,1; 55,10,1; 265,65,10,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805-A039807. A050300-A050303. a(n, 1) = A024210(n) (first column).

A050300 Matrix 6th power of partition triangle A008284.

Original entry on oeis.org

1, 6, 1, 21, 6, 1, 71, 27, 6, 1, 196, 92, 27, 6, 1, 532, 288, 98, 27, 6, 1, 1301, 799, 309, 98, 27, 6, 1, 3101, 2100, 891, 315, 98, 27, 6, 1, 6956, 5145, 2373, 912, 315, 98, 27, 6, 1, 15217, 12121, 5980, 2465, 918, 315, 98, 27, 6, 1, 31951, 27247, 14292, 6253
Offset: 1

Views

Author

Christian G. Bower, Aug 15 1999

Keywords

Examples

			1; 6,1; 21,6,1; 71,27,6,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805-A039807. A050301-A050304. a(n, 1) = A022814(n) (first column).

A039806 Matrix 4th power of partition triangle A008284.

Original entry on oeis.org

1, 4, 1, 10, 4, 1, 26, 14, 4, 1, 55, 36, 14, 4, 1, 121, 91, 40, 14, 4, 1, 237, 202, 101, 40, 14, 4, 1, 468, 439, 238, 105, 40, 14, 4, 1, 867, 887, 524, 248, 105, 40, 14, 4, 1, 1597, 1758, 1105, 560, 252, 105, 40, 14, 4, 1, 2821, 3325, 2223, 1190, 570, 252, 105, 40
Offset: 0

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Comments

Row sums form A022813 (number of terms in n-th derivative of a function composed with itself 5 times). - Paul D. Hanna, Jul 13 2004

Examples

			1; 4,1; 10,4,1; 26,14,4,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805, A039807. a(n, 1) = A022812(n) (first column).
Cf. A022813.

A050301 Matrix 7th power of partition triangle A008284.

Original entry on oeis.org

1, 7, 1, 28, 7, 1, 105, 35, 7, 1, 322, 133, 35, 7, 1, 952, 455, 140, 35, 7, 1, 2541, 1379, 483, 140, 35, 7, 1, 6539, 3920, 1512, 490, 140, 35, 7, 1, 15833, 10375, 4354, 1540, 490, 140, 35, 7, 1, 37148, 26243, 11803, 4487, 1547, 490, 140, 35, 7, 1, 83594
Offset: 1

Views

Author

Christian G. Bower, Aug 15 1999

Keywords

Examples

			1; 7,1; 28,7,1; 105,35,7,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805-A039807. A050300-A050304. a(n, 1) = A024207(n) (first column).

A050303 Matrix 9th power of partition triangle A008284.

Original entry on oeis.org

1, 9, 1, 45, 9, 1, 201, 54, 9, 1, 735, 246, 54, 9, 1, 2517, 981, 255, 54, 9, 1, 7785, 3453, 1026, 255, 54, 9, 1, 22857, 11238, 3699, 1035, 255, 54, 9, 1, 63024, 33930, 12183, 3744, 1035, 255, 54, 9, 1, 166819, 97038, 37464, 12429, 3753, 1035, 255, 54, 9, 1
Offset: 1

Views

Author

Christian G. Bower, Aug 15 1999

Keywords

Examples

			1; 9,1; 45,9,1; 201,54,9,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805-A039807. A050300-A050304. a(n, 1) = A024209(n) (first column).

A050302 Matrix 8th power of partition triangle A008284.

Original entry on oeis.org

1, 8, 1, 36, 8, 1, 148, 44, 8, 1, 498, 184, 44, 8, 1, 1590, 682, 192, 44, 8, 1, 4586, 2236, 718, 192, 44, 8, 1, 12644, 6822, 2420, 726, 192, 44, 8, 1, 32775, 19346, 7476, 2456, 726, 192, 44, 8, 1, 81901, 52177, 21646, 7660, 2464, 726, 192, 44, 8, 1, 196085
Offset: 1

Views

Author

Christian G. Bower, Aug 15 1999

Keywords

Examples

			1; 8,1; 36,8,1; 148,44,8,1; ...
		

Crossrefs

Cf. A038497, A038498, A039805-A039807. A050301-A050304. a(n, 1) = A024208(n) (first column).
Showing 1-9 of 9 results.