This site is supported by donations to The OEIS Foundation.

 Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS". Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A001402 Number of partitions of n into at most 6 parts. (Formerly M0662 N0243) 15
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 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 0 (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 *) PROG (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 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 Sequence in context: A238659 A234666 A026812 * A008629 A238864 A070289 Adjacent sequences:  A001399 A001400 A001401 * A001403 A001404 A001405 KEYWORD nonn,easy,changed AUTHOR STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.