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

A001402 Number of partitions of n into at most 6 parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 14, 20, 26, 35, 44, 58, 71, 90, 110, 136, 163, 199, 235, 282, 331, 391, 454, 532, 612, 709, 811, 931, 1057, 1206, 1360, 1540, 1729, 1945, 2172, 2432, 2702, 3009, 3331, 3692, 4070, 4494, 4935, 5427, 5942, 6510, 7104, 7760, 8442, 9192
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n into parts <= 6: a(n) = A026820(n,6). - Reinhard Zumkeller, Jan 21 2010
Counts unordered closed walks of weight n on a single vertex graph containing 6 loops of weights 1, 2, 3, 4, 5 and 6. - David Neil McGrath, Apr 11 2015
Number of different distributions of n+21 identical balls in 6 boxes as x,y,z,p,q,m where 0Ece Uslu and Esin Becenen, Jan 11 2016
a(n) could be the total number of non-isomorphic geodetic graphs of diameter n>=2 homeomorphic to the Petersen graph. - Carlos Enrique Frasser, May 24 2018

Examples

			The number of partitions of 6 into parts less than or equal to 6 is a(6)=11. These are (6)(51)(42)(33)(411)(321)(222)(3111)(2211)(21111)(111111). - _David Neil McGrath_, Apr 11 2015
a(4) = 5, i.e., {1,2,3,4,5,10},{1,2,3,4,6,9},{1,2,3,4,7,8},{1,2,3,5,6,8},{1,2,4,5,6,7} Number of different distributions of 25 identical balls in 6 boxes as x,y,z,p,q,m where 0 < x < y < z < p < q < m. - _Ece Uslu_, Esin Becenen, Jan 11 2016
		

References

  • A. Cayley, Calculation of the minimum N.G.F. of the binary seventhic, Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 10, p. 408-419.
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 2.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially same as A026812. Cf. A037145 (first differences), A288341 (partial sums).
a(n) = A008284(n+6, 6), n >= 0.
A194197(n) = a(60*n). - Alois P. Heinz, Aug 23 2011

Programs

  • Maple
    with(combstruct):ZL7:=[S,{S=Set(Cycle(Z,card<7))}, unlabeled]: seq(count(ZL7,size=n),n=0..50);  # Zerinvary Lajos, Sep 24 2007
    a:= n-> (Matrix(21, (i,j)-> if (i=j-1) then 1 elif j=1 then [1, 1, 0, 0, -1, 0, -2, 0, 1, 1, 1, 1, 0, -2, 0, -1, 0, 0, 1, 1, -1][i] else 0 fi)^n)[1,1]; seq(a(n), n=0..50);  # Alois P. Heinz, Jul 31 2008
    B:=[S,{S = Set(Sequence(Z,1 <= card),card <=6)},unlabelled]: seq(combstruct[count](B, size=n), n=0..50); # Zerinvary Lajos, Mar 21 2009
    ## more efficient for large arguments (try with 10^100 or 100^1000):
    a:= proc(n) local m, r; m := iquo (n, 60, 'r');
    (167 +(2325 +(15400 +(47250 +54000*m +4500*r)*m +3150*r +150*r^2)*m
    +[0, 795, 1875, 3030, 4500, 6075, 7995, 10050, 12480, 15075, 18075, 21270, 24900, 28755, 33075, 37650, 42720, 48075, 53955, 60150, 66900, 73995, 81675, 89730, 98400, 107475, 117195, 127350, 138180, 149475, 161475, 173970, 187200, 200955, 215475, 230550, 246420, 262875, 280155, 298050, 316800, 336195, 356475, 377430, 399300, 421875, 445395, 469650, 494880, 520875, 547875, 575670, 604500, 634155, 664875, 696450, 729120, 762675, 797355, 832950][r+1])*m
    +[0, 63, 207, 348, 570, 795, 1143, 1482, 1968, 2475, 3135, 3828, 4722, 5643, 6795, 8010, 9468, 11007, 12843, 14760, 17010, 19383, 22107, 24978, 28260, 31695, 35583, 39672, 44238, 49035, 54375, 59958, 66132, 72603, 79695, 87120, 95238, 103707, 112923, 122550, 132960, 143823, 155547, 167748, 180870, 194535, 209163, 224382, 240648, 257535, 275535, 294228, 314082, 334683, 356535, 379170, 403128, 427947, 454143, 481260][r+1])*m/6
    +[1, 1, 2, 3, 5, 7, 11, 14, 20, 26, 35, 44, 58, 71, 90, 110, 136, 163, 199, 235, 282, 331, 391, 454, 532, 612, 709, 811, 931, 1057, 1206, 1360, 1540, 1729, 1945, 2172, 2432, 2702, 3009, 3331, 3692, 4070, 4494, 4935, 5427, 5942, 6510, 7104, 7760, 8442, 9192, 9975, 10829, 11720, 12692, 13702, 14800, 15944, 17180, 18467][r+1] end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 22 2011
    A := [1,1,2,3,5,7,11,14,20,26,35,44,58,71,90,110,136,163,199,235,282];
    a := proc(n) option remember; if n < 21 then A[n+1] else 1+(a(n-2)+a(n-3)+a(n-4))-(2*a(n-7)+2*a(n-8)+a(n-9))+(a(n-11)+2*a(n-12)+2*a(n-13))-(a(n-16)+a(n-17)+a(n-18))+(a(n-20)) fi end:
    seq(a(i),i=0..50); # Peter Luschny, Aug 23 2011
    ## program using quasi-polynomials; see article by Sills and Zeilberger:
    a:= m-> subs (n=m, add ([[n^5/86400 +7*n^4/11520 +77*n^3/6480 +245*n^2/2304 +43981*n/103680 +199577/345600], [-n^2/768 -7*n/256 -581/4608, n^2/768 +7*n/256 +581/4608], [-n/162 -19/324, -n/162 -23/324, n/81 +7/54], [1/32, -1/32, -1/32, 1/32], [1/25, 0, -1/25, -2/25, 2/25], [1/36, -1/36, -1/18, -1/36, 1/36, 1/18]][r][1 +irem (m-1+r, r)], r=1..6)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 24 2011
    ## using Andrews-style expressions; see article by Sills and Zeilberger:
    a:= n-> 1 +31*n^2/288 +floor(n/4)/16 -floor(n/4 +1/2)/16 +7*n^4/11520 +floor(n/5)/5 +n^5/86400 -(n^2/384 +7*n/128 +581/2304)*n +(n^2/192 +7*n/64 +581/1152) *floor(n/2) -(n/54 +61/324)*n +(n/54 +19/108) *floor((n+1)/3) +(n/27 +7/18) *floor(n/3) +floor(n/6)/18 -floor(n/6 +2/3)/36 +floor(n/6 +1/3)/18 +floor((n+1)/6)/12 +713*n/1800 +77*n^3/6480:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 24 2011
  • Mathematica
    CoefficientList[ Series[ 1/((1 - x)*(1 - x^2)*(1 - x^3)*(1 - x^4)*(1 - x^5)*(1 - x^6)), {x, 0, 60} ], x ]
    (* Second program: *)
    T[n_, k_] := T[n, k] = If[n==0 || k==1, 1, T[n, k-1] + If[k>n, 0, T[n-k, k]]]; a[n_] := T[n, 6]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 12 2017, after Alois P. Heinz's code for A026820 *)
    Table[Length[IntegerPartitions[n,6]],{n,0,50}] (* Harvey P. Dale, Jul 30 2025 *)
  • PARI
    a(n)=floor((6*n^5+315*n^4+6160*n^3+55125*n^2+(216705+9600*(n%3<1))*n+527500)/518400+(n+1)*(n+20)*(-1)^n/768) \\ Tani Akinari, May 27 2014
    
  • PARI
    a(n)={round((n+11)*((6*n^4+249*n^3+2071*n^2-4931*n+40621)/518400+n\2*(n+10) /192+( (n+1)\3+ n\3*2 )/54))};
    vector(60,n,n--; a(n)) \\ Washington Bomfim, Jan 16 2021

Formula

a(n) = 1 + (a(n-2) + a(n-3) + a(n-4)) - (2*a(n-7) + 2*a(n-8) + a(n-9)) + (a(n-11) + 2*a(n-12) + 2*a(n-13)) - (a(n-16) + a(n-17) + a(n-18)) + (a(n-20)). - Norman J. Meluch (norm(AT)iss.gm.com), Mar 09 2000
G.f.: 1/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)*(1-x^6)). - Alois P. Heinz, Aug 22 2011
a(n) ~ n^5 / 86400. - Charles R Greathouse IV, Aug 23 2011
a(n) = (167 + (2325 + (15400 + (47250 + 54000*m + 4500*r)*m + 3150*r + 150*r^2)*m + X(r))*m + Y(r))*m/6 + Z(r) where m = floor(n/60), r = n mod 60 and X, Y, Z are functions of r (see Maple program below). - Alois P. Heinz, Aug 23 2011
a(n) = floor((2 + 3*(floor(n/3) + floor(-n/3))) * (floor(n/3)+1)/54 + (6*n^5 + 315*n^4 + 6160*n^3 + 55125*n^2 + 219905*n + 485700)/518400 + (n+1)*(n+20)*(-1)^n/768). - Tani Akinari, Aug 05 2013
a(n) = a(n-1) + a(n-2) - a(n-5) - 2*a(n-7) + a(n-9) + a(n-10) + a(n-11) + a(n-12) - 2*a(n-14) - a(n-16) + a(n-19) + a(n-20) - a(n-21). - David Neil McGrath, Apr 11 2015
a(n+6) = a(n) + A001401(n). - Ece Uslu, Esin Becenen, Jan 11 2016
a(n) = round((n+11)*((6*n^4 + 249*n^3 + 2071*n^2 - 4931*n + 40621)/518400 + floor(n/2)*(n+10)/192 + (floor((n+1)/3) + 2*floor(n/3))/54)). - Washington Bomfim, Jan 15 2021
Showing 1-1 of 1 results.