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

A008289 Triangle read by rows: Q(n,m) = number of partitions of n into m distinct parts, n>=1, m>=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 4, 3, 1, 4, 4, 1, 1, 5, 5, 1, 1, 5, 7, 2, 1, 6, 8, 3, 1, 6, 10, 5, 1, 7, 12, 6, 1, 1, 7, 14, 9, 1, 1, 8, 16, 11, 2, 1, 8, 19, 15, 3, 1, 9, 21, 18, 5, 1, 9, 24, 23, 7, 1, 10, 27, 27, 10, 1, 1, 10, 30, 34, 13, 1, 1, 11, 33, 39, 18, 2, 1, 11, 37
Offset: 1

Views

Author

Keywords

Comments

Row n contains A003056(n) = floor((sqrt(8*n+1)-1)/2) terms (number of terms increases by one at each triangular number). - Michael Somos, Dec 04 2002
Row sums give A000009.
Q(n,m) is the number of partitions of n whose greatest part is m and every number in {1,2,...,m} occurs as a part at least once. - Geoffrey Critzer, Nov 17 2011

Examples

			Q(8,3) = 2 since 8 can be written in 2 ways as sum of 3 distinct positive integers: 5+2+1 and 4+3+1.
Triangle starts:
  1;
  1;
  1,  1;
  1,  1;
  1,  2;
  1,  2,  1;
  1,  3,  1;
  1,  3,  2;
  1,  4,  3;
  1,  4,  4,  1;
  1,  5,  5,  1;
  1,  5,  7,  2;
  1,  6,  8,  3;
  1,  6, 10,  5;
  1,  7, 12,  6,  1;
  1,  7, 14,  9,  1;
  1,  8, 16, 11,  2;
  1,  8, 19, 15,  3;
  1,  9, 21, 18,  5;
  1,  9, 24, 23,  7;
  1, 10, 27, 27, 10,  1;
  1, 10, 30, 34, 13,  1;
  1, 11, 33, 39, 18,  2;
  1, 11, 37, 47, 23,  3;
  1, 12, 40, 54, 30,  5;
  1, 12, 44, 64, 37,  7;
  1, 13, 48, 72, 47, 11;
  1, 13, 52, 84, 57, 14, 1;
  1, 14, 56, 94, 70, 20, 1; ...
Q(8,3) = 2 because there are 2 partitions of 8 in which  1, 2 and 3 occur as a part at least once: (3,2,2,1), (3,2,1,1,1). - _Geoffrey Critzer_, Nov 17 2011
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115.

Crossrefs

Sum of n-th row is A000009(n). Sum(Q(n,k)*k, k>=1) = A015723(n).
A060016 is another version.
Cf. A032020.

Programs

  • Maple
    g:=product(1+t*x^j,j=1..40): gser:=simplify(series(g,x=0,32)): P[0]:=1: for n from 1 to 30 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 25 do seq(coeff(P[n],t,j),j=1..floor((sqrt(8*n+1)-1)/2)) od; # yields sequence in triangular form; Emeric Deutsch, Feb 21 2006
    # second Maple program:
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    T:= n-> subsop(1=NULL, b(n, n))[]:
    seq(T(n), n=1..40);  # Alois P. Heinz, Nov 18 2012
  • Mathematica
    q[n_, k_] := q[n, k] = If[n < k || k < 1, 0, If[n == 1, 1, q[n-k, k] + q[n-k, k-1]]]; Take[ Flatten[ Table[q[n, k], {n, 1, 24}, {k, 1, Floor[(Sqrt[8n+1] - 1)/2]}]], 91] (* Jean-François Alcover, Aug 01 2011, after PARI prog. *)
    (* As a triangular table: *)
    Table[Coefficient[Series[Product[1+t    x^i,{i,n}],{x,0,n}],x^n t^m],{n,24},{m,n}] (* Wouter Meeussen, Feb 22 2014 *)
    Table[Count[PowersRepresentations[n, k, 1], ?(Nor[MemberQ[#, 0], MemberQ[Differences@ #, 0]] &)], {n, 23}, {k, Floor[(Sqrt[8 n + 1] - 1)/2]}] // Flatten (* _Michael De Vlieger, Jul 12 2017 *)
    nrows = 24; d=Table[Select[IntegerPartitions[n], DeleteDuplicates[#] == # &],{n, nrows}] ;
    Flatten@Table[Table[Count[d[[n]], x_ /; Length[x] == m], {m, Floor[(Sqrt[8 n + 1] - 1)/2]}], {n, nrows}] (* Robert Price, Aug 17 2020 *)
  • PARI
    {Q(n, k) = if( k<0 || k>n,0, polcoeff( polcoeff( prod(i=1, n, 1 + y*x^i, 1 + x * O(x^n)), n), k))}; /* Michael Somos, Dec 04 2002 */
    
  • PARI
    Q(n,k)=if(nPaul D. Hanna
    
  • PARI
    {Q(n, k) = my(u); if( n<1 || k<1 || k>(sqrtint(8*n+1)-1)\2, 0, u = n - k *(k+1)/2; polcoeff( 1 / prod(i=1, k, 1 - x^i, 1 + x*O(x^u)), u))}; /* Michael Somos, Jul 11 2017 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A008289_T(n,k):
        if k<1 or nA008289_T(n-k,k)+A008289_T(n-k,k-1) # Chai Wah Wu, Sep 22 2023

Formula

G.f.: Product_{n>0} (1 + y*x^n) = 1 + Sum_{n>0, k>0} Q(n, k) * x^n * y^k. - Michael Somos, Dec 04 2002
Q(n, k) = Q(n-k, k) + Q(n-k, k-1) for n>k>=1, with Q(1, 1)=1, Q(n, 0)=0 (n>=1). - Paul D. Hanna, Mar 04 2005
G.f.: Sum_{n>0, k>0} x^n * y^(k*(k+1)/2) / Product_{i=1..k} (1 - y^i). - Michael Somos, Jul 11 2017
Sum_{k>=0} k! * Q(n,k) = A032020(n). - Alois P. Heinz, Feb 25 2020
Q(n, m) = A008284(n - m*(m-1)/2, m) = A026820(n - m*(m+1)/2, m), using for the latter, the extension A026820(n, k) = A026820(n, n) = A000041(n), for every k >= n >= 0. - Álvar Ibeas, Jul 23 2020

Extensions

Additional comments from Michael Somos, Dec 04 2002
Entry revised by N. J. A. Sloane, Nov 20 2006

A104383 Number of distinct partitions of triangular numbers n*(n+1)/2.

Original entry on oeis.org

1, 1, 2, 4, 10, 27, 76, 222, 668, 2048, 6378, 20132, 64234, 206848, 671418, 2194432, 7215644, 23853318, 79229676, 264288462, 884987529, 2973772212, 10024300890, 33888946600, 114872472064, 390334057172, 1329347719190, 4536808055808, 15513418629884
Offset: 0

Views

Author

Paul D. Hanna, Mar 04 2005

Keywords

Comments

Equals row sums of triangle A104382. Asymptotics: a(n) ~ exp(Pi*sqrt((n^2+n)/6))/(2*6^(1/4))/(n^2+n)^(3/4).

References

  • Abramowitz, M. and Stegun, I. A. (Editors). "Partitions into Distinct Parts." S24.2.2 in Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables, 9th printing. New York: Dover, pp. 825-826, 1972.

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(d::odd, d, 0), d=divisors(j))*b(n-j), j=1..n)/n)
        end:
    a:= n-> b(n*(n+1)/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 24 2016
  • Mathematica
    Join[{1},PartitionsQ/@Accumulate[Range[30]]] (* Harvey P. Dale, Dec 29 2012 *)
  • PARI
    {a(n)=polcoeff(prod(k=1,n*(n+1)/2,1+x^k,1+x*O(x^(n*(n+1)/2))),n*(n+1)/2)}

Formula

Limit_{n-->inf} a(n+1)/a(n) = exp(sqrt(Pi^2/6)) = 3.605822247984...
a(n) = A000009(A000217(n)). - Alois P. Heinz, Nov 24 2016

Extensions

a(0)=1 prepended by Alois P. Heinz, Aug 05 2016

A104384 Number of partitions of triangular numbers n*(n+1)/2 into (n-2) distinct parts for n>=3.

Original entry on oeis.org

1, 4, 12, 27, 57, 110, 201, 352, 598, 984, 1586, 2503, 3882, 5928, 8932, 13287, 19551, 28472, 41078, 58754, 83372, 117417, 164230, 228212, 315190, 432817, 591130, 803192, 1086035, 1461680, 1958596, 2613417, 3473190, 4598073, 6064920, 7971480
Offset: 3

Views

Author

Paul D. Hanna, Mar 04 2005

Keywords

Comments

In triangle A104382, equals the second diagonal down from the main diagonal.
Also equals a diagonal with slope -3 in the Partition Numbers triangle A008284, found at n = 3+3k, or T(3+3k,k) for k >=1. - Richard R. Forberg, Dec 02 2014

Crossrefs

Programs

  • PARI
    {a(n)=if(n<3,0,polcoeff(polcoeff( prod(i=1,n*(n+1)/2,1+y*x^i,1+x*O(x^(n*(n+1)/2))),n*(n+1)/2,x),n-2,y))}

Formula

From Álvar Ibeas, Jul 23 2020: (Start)
Writing p(m) for A000041(m),
a(n) = p(2n-1) - A000070(n) + 1 and
a(n+1) - a(n) = p(2*n+1) - p(2*n-1) - p(n+1) = A027336(2*n+1) - p(n+1).
(End)

A104385 Number of distinct partitions of triangular numbers n*(n+1)/2 into 3 parts for n>=1.

Original entry on oeis.org

0, 0, 1, 4, 12, 27, 52, 91, 147, 225, 331, 469, 645, 867, 1141, 1474, 1875, 2352, 2914, 3571, 4332, 5208, 6211, 7351, 8640, 10092, 11719, 13534, 15552, 17787, 20254, 22969, 25947, 29205, 32761, 36631, 40833, 45387, 50311, 55624
Offset: 1

Views

Author

Paul D. Hanna, Mar 04 2005

Keywords

Comments

Equals the third column in triangle A104382.

Crossrefs

Programs

  • PARI
    {a(n)=if(n<1,0,polcoeff(polcoeff( prod(i=1,n*(n+1)/2,1+y*x^i,1+x*O(x^(n*(n+1)/2))),n*(n+1)/2,x),3,y))}

Formula

a(n) = round((3n^4 + 6n^3 - 33n^2 - 36n + 110)/144) (conjectured). - Ralf Stephan, Nov 13 2010.
Showing 1-4 of 4 results.