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.
%I A165817 #87 Aug 17 2025 11:17:36 %S A165817 1,2,10,56,330,2002,12376,77520,490314,3124550,20030010,129024480, %T A165817 834451800,5414950296,35240152720,229911617056,1503232609098, %U A165817 9847379391150,64617565719070,424655979547800,2794563003870330,18412956934908690,121455445321173600 %N A165817 Number of compositions (= ordered integer partitions) of n into 2n parts. %C A165817 Number of ways to put n indistinguishable balls into 2*n distinguishable boxes. %C A165817 Number of rankings of n unlabeled elements for 2*n levels. %H A165817 Alois P. Heinz, <a href="/A165817/b165817.txt">Table of n, a(n) for n = 0..400</a> %H A165817 W. Mlotkowski and K. A. Penson, <a href="http://arxiv.org/abs/1309.0595">Probability distributions with binomial moments</a>, arXiv preprint arXiv:1309.0595 [math.PR], 2013. %F A165817 a(n) = 9*sqrt(3)*GAMMA(n+5/3)*GAMMA(n+4/3)*27^n/(Pi*GAMMA(2*n+3)). %F A165817 a(n) = binomial(3*n-1, n); %F A165817 Let denote P(n) = the number of integer partitions of n, %F A165817 p(i) = the number of parts of the i-th partition of n, %F A165817 d(i) = the number of different parts of the i-th partition of n, %F A165817 m(i,j) = multiplicity of the j-th part of the i-th partition of n. %F A165817 Then one has: %F A165817 a(n) = Sum_{i=1..P(n)} (2*n)!/((2*n-p(i))!*(Prod_{j=1..d(i)} m(i,j)!)). %F A165817 a(n) = rf(2*n,n)/ff(n,n), where rf is the rising factorial and ff the falling factorial. - _Peter Luschny_, Nov 21 2012 %F A165817 G.f.: A(x) = x*B'(x)/B(x), where B(x) satisfies B(x)^3-2*B(x)^2+B(x)=x, B(x)=A006013(x). - _Vladimir Kruchinin_, Feb 06 2013 %F A165817 G.f.: A(x) = sqrt(3*x)*cot(asin((3^(3/2)*sqrt(x))/2)/3)/(sqrt(4-27*x)). - _Vladimir Kruchinin_, Mar 18 2015 %F A165817 a(n) = Sum_{k=0..n} binomial(n-1,n-k)*binomial(2*n,k). - _Vladimir Kruchinin_, Oct 06 2015 %F A165817 From _Peter Bala_, Nov 04 2015: (Start) %F A165817 The o.g.f. equals f(x)/g(x), where f(x) is the o.g.f. for A005809 and g(x) is the o.g.f. for A001764. More generally, f(x)*g(x)^k is the o.g.f. for the sequence binomial(3*n + k,n). Cf. A045721 (k = 1), A025174 (k = 2), A004319 (k = 3), A236194 (k = 4), A013698 (k = 5) and A117671 (k = -2). (End) %F A165817 a(n) = [x^n] 1/(1 - x)^(2*n). - _Ilya Gutkovskiy_, Oct 03 2017 %F A165817 a(n) = A059481(2n,n). - _Alois P. Heinz_, Oct 17 2022 %F A165817 From _Peter Bala_, Feb 14 2024: (Start) %F A165817 a(n) = (-1)^n * binomial(-2*n, n). %F A165817 a(n) = hypergeom([1 - 2*n, -n], [1], 1). %F A165817 The g.f. A(x) satisfies A(x/(1 + x)^3) = 1/(1 - 2*x). %F A165817 Sum_{n >= 0} a(n)/9^n = (1 + 4*cos(Pi/9))/3. %F A165817 Sum_{n >= 0} a(n)/27^n = (3 + 4*sqrt(3)*cos(Pi/18))/9. %F A165817 Sum_{n >= 0} a(n)*(2/27)^n = (2 + sqrt(3))/3. (End) %F A165817 From _Peter Bala_, Sep 16 2024: (Start) %F A165817 a(n) = Sum_{k = 0..n} binomial(n+k-1, k)*binomial(2*n-k-1, n-k). %F A165817 More generally, a(n) = Sum_{k = 0..n} (-1)^k*binomial(x*n, k)*binomial((x+3)*n-k-1, n-k) for arbitrary x. %F A165817 a(n) = (2/3) * Sum_{k = 0..n} (-1)^k*binomial(x*n+k-1, k)*binomial((x+3)*n, n-k) for n >= 1 and arbitrary x. (End) %F A165817 G.f.: 1/(3-2*g) where g = 1+x*g^3 is the g.f. of A001764. - _Seiichi Manyama_, Aug 17 2025 %e A165817 Let [1,1,1], [1,2] and [3] be the integer partitions of n=3. %e A165817 Then [0,0,0,1,1,1], [0,0,0,0,1,2] and [0,0,0,0,0,3] are the corresponding partitions occupying 2*n = 6 positions. %e A165817 We have to take into account the multiplicities of the parts including the multiplicities of the zeros. %e A165817 Then %e A165817 [0,0,0,1,1,1] --> 6!/(3!*3!) = 20 %e A165817 [0,0,0,0,1,2] --> 6!/(4!*1!*1!) = 30 %e A165817 [0,0,0,0,0,3] --> 6!/(5!*1!) = 6 %e A165817 and thus a(3) = 20+30+6=56. %e A165817 a(2)=10, since we have 10 ordered partitions of n=2 where the parts are distributed over 2*n=4 boxes: %e A165817 [0, 0, 0, 2] %e A165817 [0, 0, 1, 1] %e A165817 [0, 0, 2, 0] %e A165817 [0, 1, 0, 1] %e A165817 [0, 1, 1, 0] %e A165817 [0, 2, 0, 0] %e A165817 [1, 0, 0, 1] %e A165817 [1, 0, 1, 0] %e A165817 [1, 1, 0, 0] %e A165817 [2, 0, 0, 0]. %p A165817 for n from 0 to 16 do %p A165817 a[n] := 9*sqrt(3)*GAMMA(n+5/3)*GAMMA(n+4/3)*27^n/(Pi*GAMMA(2*n+3)) %p A165817 end do; %t A165817 Table[Binomial[3 n - 1, n], {n, 0, 20}] (* _Vincenzo Librandi_, Aug 07 2014 *) %o A165817 (Sage) %o A165817 def A165817(n): %o A165817 return rising_factorial(2*n,n)/falling_factorial(n,n) %o A165817 [A165817(n) for n in (0..22)] # _Peter Luschny_, Nov 21 2012 %o A165817 (Magma) [Binomial(3*n-1, n): n in [0..30]]; // _Vincenzo Librandi_, Aug 07 2014 %o A165817 (PARI) vector(30, n, n--; binomial(3*n-1, n)) \\ _Altug Alkan_, Nov 04 2015 %o A165817 (Python) %o A165817 from math import comb %o A165817 def A165817(n): return comb(3*n-1,n) if n else 1 # _Chai Wah Wu_, Oct 11 2023 %Y A165817 Cf. A000079, A001700, A059481, A081204, A001764, A004319, A006013, A005809, A013698, A025174, A045721, A117671, A236194. %K A165817 nonn,easy %O A165817 0,2 %A A165817 _Thomas Wieder_, Sep 29 2009 %E A165817 a(0) prepended and more terms from _Alois P. Heinz_, Apr 04 2012