login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001402 Number of partitions of n into at most 6 parts.
(Formerly M0662 N0243)
18

%I M0662 N0243 #177 Sep 11 2022 09:35:18

%S 1,1,2,3,5,7,11,14,20,26,35,44,58,71,90,110,136,163,199,235,282,331,

%T 391,454,532,612,709,811,931,1057,1206,1360,1540,1729,1945,2172,2432,

%U 2702,3009,3331,3692,4070,4494,4935,5427,5942,6510,7104,7760,8442,9192

%N Number of partitions of n into at most 6 parts.

%C Also number of partitions of n into parts <= 6: a(n) = A026820(n,6). - _Reinhard Zumkeller_, Jan 21 2010

%C 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

%C Number of different distributions of n+21 identical balls in 6 boxes as x,y,z,p,q,m where 0<x<y<z<p<q<m. - _Ece Uslu_ and Esin Becenen, Jan 11 2016

%C 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

%D 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.

%D H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 2.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Washington Bomfim, <a href="/A001402/b001402.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from T. D. Noe)

%H G. E. Andrews, <a href="https://doi.org/10.1023/A:1026224002193">Partitions: At the Interface of q-Series and Modular Forms</a>, The Ramanujan Journal 7, 385-400 (2003), Eq.(3.10).

%H A. Cayley, <a href="https://doi.org/10.2307/2369198">Calculation of the minimum N.G.F. of the binary seventhic</a>, American Journal of Mathematics, Vol. 2, No. 1 (Mar., 1879), pp. 71-84 (14 pages).

%H A. Cayley, <a href="/A001993/a001993.pdf">Calculation of the minimum N.G.F. of the binary seventhic</a>, Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 10, p. 408-419. [Annotated scanned copy]

%H C. E. Frasser and G. N. Vostrov, <a href="https://arxiv.org/abs/1611.01873">Geodetic Graphs Homeomorphic to a Given Geodetic Graph</a>, arXiv:1611.01873 [cs.DM], 2016. [p. 27]

%H R. K. Guy, <a href="/A005347/a005347.pdf">The Second Strong Law of Small Numbers</a>, Math. Mag, 63 (1990), no. 1, 3-20. [Annotated scanned copy]

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=355">Encyclopedia of Combinatorial Structures 355</a>

%H A. V. Sills and D. Zeilberger, <a href="http://arxiv.org/abs/1108.4391">Formulae for the number of partitions of n into at most m parts (using the quasi-polynomial ansatz)</a>, arXiv:1108.4391 [math.CO], 2011.

%H <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>

%H <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,0,-1,0,-2,0,1,1,1,1,0,-2,0,-1,0,0,1,1,-1).

%F 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

%F 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

%F a(n) ~ n^5 / 86400. - _Charles R Greathouse IV_, Aug 23 2011

%F 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

%F 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

%F 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

%F a(n+6) = a(n) + A001401(n). - _Ece Uslu_, Esin Becenen, Jan 11 2016

%F 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

%e 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

%e 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

%p with(combstruct):ZL7:=[S,{S=Set(Cycle(Z,card<7))}, unlabeled]: seq(count(ZL7,size=n),n=0..50); # _Zerinvary Lajos_, Sep 24 2007

%p 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

%p 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

%p ## more efficient for large arguments (try with 10^100 or 100^1000):

%p a:= proc(n) local m, r; m := iquo (n, 60, 'r');

%p (167 +(2325 +(15400 +(47250 +54000*m +4500*r)*m +3150*r +150*r^2)*m

%p +[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

%p +[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

%p +[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:

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Aug 22 2011

%p A := [1,1,2,3,5,7,11,14,20,26,35,44,58,71,90,110,136,163,199,235,282];

%p 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:

%p seq(a(i),i=0..50); # _Peter Luschny_, Aug 23 2011

%p ## program using quasi-polynomials; see article by Sills and Zeilberger:

%p 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)):

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Aug 24 2011

%p ## using Andrews-style expressions; see article by Sills and Zeilberger:

%p 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:

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Aug 24 2011

%t CoefficientList[ Series[ 1/((1 - x)*(1 - x^2)*(1 - x^3)*(1 - x^4)*(1 - x^5)*(1 - x^6)), {x, 0, 60} ], x ]

%t (* Second program: *)

%t 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 *)

%o (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

%o (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))};

%o vector(60,n,n--; a(n)) \\ _Washington Bomfim_, Jan 16 2021

%Y Essentially same as A026812. Cf. A037145 (first differences), A288341 (partial sums).

%Y a(n) = A008284(n+6, 6), n >= 0.

%Y A194197(n) = a(60*n). - _Alois P. Heinz_, Aug 23 2011

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)