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-10 of 14 results. Next

A002426 Central trinomial coefficients: largest coefficient of (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, 616227, 1787607, 5196627, 15134931, 44152809, 128996853, 377379369, 1105350729, 3241135527, 9513228123, 27948336381, 82176836301, 241813226151, 712070156203, 2098240353907, 6186675630819
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n + 1 edges, having root of odd degree and nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 02 2002
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), running from (0,0) to (n,0) (i.e., grand Motzkin paths of length n). For example, a(3) = 7 because we have HHH, HUD, HDU, UDH, DUH, UHD and DHU. - Emeric Deutsch, May 31 2003
Number of lattice paths from (0,0) to (n,n) using steps (2,0), (0,2), (1,1). It appears that 1/sqrt((1 - x)^2 - 4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1). - Joerg Arndt, Jul 01 2011
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Binomial transform of A000984, with interpolated zeros. - Paul Barry, Jul 01 2003
Number of leaves in all 0-1-2 trees with n edges, n > 0. (A 0-1-2 tree is an ordered tree in which every vertex has at most two children.) - Emeric Deutsch, Nov 30 2003
a(n) is the number of UDU-free paths of n + 1 upsteps (U) and n downsteps (D) that start U. For example, a(2) = 3 counts UUUDD, UUDDU, UDDUU. - David Callan, Aug 18 2004
Diagonal sums of triangle A063007. - Paul Barry, Aug 31 2004
Number of ordered ballots from n voters that result in an equal number of votes for candidates A and B in a three candidate election. Ties are counted even when candidates A and B lose the election. For example, a(3) = 7 because ballots of the form (voter-1 choice, voter-2 choice, voter-3 choice) that result in equal votes for candidates A and B are the following: (A,B,C), (A,C,B), (B,A,C), (B,C,A), (C,A,B), (C,B,A) and (C,C,C). - Dennis P. Walsh, Oct 08 2004
a(n) is the number of weakly increasing sequences (a_1,a_2,...,a_n) with each a_i in [n]={1,2,...,n} and no element of [n] occurring more than twice. For n = 3, the sequences are 112, 113, 122, 123, 133, 223, 233. - David Callan, Oct 24 2004
Note that n divides a(n+1) - a(n). In fact, (a(n+1) - a(n))/n = A007971(n+1). - T. D. Noe, Mar 16 2005
Row sums of triangle A105868. - Paul Barry, Apr 23 2005
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), starting at (0,0), staying weakly above the x-axis (i.e., left factors of Motzkin paths) and having no H steps on the x-axis. Example: a(3) = 7 because we have UDU, UHD, UHH, UHU, UUD, UUH and UUU. - Emeric Deutsch, Oct 07 2007
Equals right border of triangle A152227; starting with offset 1, the row sums of triangle A152227. - Gary W. Adamson, Nov 29 2008
Starting with offset 1 = iterates of M * [1,1,1,...] where M = a tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super and subdiagonals. - Gary W. Adamson, Jan 07 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
a(n) is prime for n = 2, 3 and 4, with no others for n <= 10^5 (E. W. Weisstein, Mar 14 2005). It has apparently not been proved that no [other] prime central trinomials exist. - Jonathan Vos Post, Mar 19 2010
a(n) is not divisible by 3 for n whose base-3 representation contains no 2 (A005836).
a(n) = number of (n-1)-lettered words in the alphabet {1,2,3} with as many occurrences of the substring (consecutive subword) [1,2] as those of [2,1]. See the papers by Ekhad-Zeilberger and Zeilberger. - N. J. A. Sloane, Jul 05 2012
a(n) = coefficient of x^n in (1 + x + x^2)^n. - L. Edson Jeffery, Mar 23 2013
a(n) is the number of ordered pairs (A,B) of subsets of {1,2,...,n} such that (i.) A and B are disjoint and (ii.) A and B contain the same number of elements. For example, a(2) = 3 because we have: ({},{}) ; ({1},{2}) ; ({2},{1}). - Geoffrey Critzer, Sep 04 2013
Also central terms of A082601. - Reinhard Zumkeller, Apr 13 2014
a(n) is the number of n-tuples with entries 0, 1, or 2 and with the sum of entries equal to n. For n=3, the seven 3-tuples are (1,1,1), (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), and (2,1,0). - Dennis P. Walsh, May 08 2015
The series 2*a(n) + 3*a(n+1) + a(n+2) = 2*A245455(n+3) has Hankel transform of L(2n+1)*2^n, offset n = 1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
The series (2*a(n) + 3*a(n+1) + a(n+2))/2 = A245455(n+3) has Hankel transform of L(2n+1), offset n=1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
Conjecture: An integer n > 3 is prime if and only if a(n) == 1 (mod n^2). We have verified this for n up to 8*10^5, and proved that a(p) == 1 (mod p^2) for any prime p > 3 (cf. A277640). - Zhi-Wei Sun, Nov 30 2016
This is the analog for Coxeter type B of Motzkin numbers (A001006) for Coxeter type A. - F. Chapoton, Jul 19 2017
a(n) is also the number of solutions to the equation x(1) + x(2) + ... + x(n) = 0, where x(1), ..., x(n) are in the set {-1,0,1}. Indeed, the terms in (1 + x + x^2)^n that produce x^n are of the form x^i(1)*x^i(2)*...*x^i(n) where i(1), i(2), ..., i(n) are in {0,1,2} and i(1) + i(2) + ... + i(n) = n. By setting j(t) = i(t) - 1 we obtain that j(1), ..., j(n) satisfy j(1) + ... + j(n) =0 and j(t) in {-1,0,1} for all t = 1..n. - Lucien Haddad, Mar 10 2018
If n is a prime greater than 3 then a(n)-1 is divisible by n^2. - Ira M. Gessel, Aug 08 2021
Let f(m) = ceiling((q+log(q))/log(9)), where q = -log(log(27)/(2*m^2*Pi)) then f(a(n)) = n, for n > 0. - Miko Labalan, Oct 07 2024
Diagonal of the rational function 1 / (1 - x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 23 2025

Examples

			For n = 2, (x^2 + x + 1)^2 = x^4 + 2*x^3 + 3*x^2 + 2*x + 1, so a(2) = 3. - _Michael B. Porter_, Sep 06 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 78 and 163, #19.
  • L. Euler, Exemplum Memorabile Inductionis Fallacis, Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 15, p. 59.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 575.
  • P. Henrici, Applied and Computational Complex Analysis. Wiley, NY, 3 vols., 1974-1986. (Vol. 1, p. 42.)
  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 579.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 74.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 6.3.8.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 22.
  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346. See p. 341.

Crossrefs

INVERT transform is A007971. Partial sums are A097893. Squares are A168597.
Main column of A027907. Column k=2 of A305161. Column k=0 of A328347. Column 1 of A201552(?).
Cf. A001006, A002878, A005043, A005717, A082758 (bisection), A273055 (bisection), A102445, A113302, A113303, A113304, A113305 (divisibility of central trinomial coefficients), A152227, A277640.

Programs

  • Haskell
    a002426 n = a027907 n n  -- Reinhard Zumkeller, Jan 22 2013
    
  • Magma
    P:=PolynomialRing(Integers()); [Max(Coefficients((1+x+x^2)^n)): n in [0..26]]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    A002426 := proc(n) local k;
        sum(binomial(n, k)*binomial(n-k, k), k=0..floor(n/2));
    end proc: # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # Alternatively:
    a := n -> simplify(GegenbauerC(n,-n,-1/2)):
    seq(a(n), n=0..29); # Peter Luschny, May 07 2016
  • Mathematica
    Table[ CoefficientList[ Series[(1 + x + x^2)^n, {x, 0, n}], x][[ -1]], {n, 0, 27}] (* Robert G. Wilson v *)
    a=b=1; Join[{a,b}, Table[c=((2n-1)b + 3(n-1)a)/n; a=b; b=c; c, {n,2,100}]]; Table[Sqrt[-3]^n LegendreP[n,1/Sqrt[-3]],{n,0,26}] (* Wouter Meeussen, Feb 16 2013 *)
    a[ n_] := If[ n < 0, 0, 3^n Hypergeometric2F1[ 1/2, -n, 1, 4/3]]; (* Michael Somos, Jul 08 2014 *)
    Table[4^n *JacobiP[n,-n-1/2,-n-1/2,-1/2], {n,0,29}] (* Peter Luschny, May 13 2016 *)
    a[n_] := a[n] = Sum[n!/((n - 2*i)!*(i!)^2), {i, 0, n/2}]; Table[a[n], {n, 0, 29}] (* Shara Lalo and Zagros Lalo, Oct 03 2018 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    makelist(trinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    makelist(ultraspherical(n,-n,-1/2),n,0,12); /* Emanuele Munarini, Dec 20 2016 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n))};
    
  • PARI
    /* as lattice paths: same as in A092566 but use */
    steps=[[2, 0], [0, 2], [1, 1]];
    /* Joerg Arndt, Jul 01 2011 */
    
  • PARI
    a(n)=polcoeff(sum(m=0, n, (2*m)!/m!^2 * x^(2*m) / (1-x+x*O(x^n))^(2*m+1)), n) \\ Paul D. Hanna, Sep 21 2013
    
  • Python
    from math import comb
    def A002426(n): return sum(comb(n,k)*comb(k,n-k) for k in range(n+1)) # Chai Wah Wu, Nov 15 2022
  • Sage
    A002426 = lambda n: hypergeometric([-n/2, (1-n)/2], [1], 4)
    [simplify(A002426(n)) for n in (0..29)]
    # Peter Luschny, Sep 17 2014
    
  • Sage
    def A():
        a, b, n = 1, 1, 1
        yield a
        while True:
            yield b
            n += 1
            a, b = b, ((3 * (n - 1)) * a + (2 * n - 1) * b) // n
    A002426 = A()
    print([next(A002426) for  in range(30)])  # _Peter Luschny, May 16 2016
    

Formula

G.f.: 1/sqrt(1 - 2*x - 3*x^2).
E.g.f.: exp(x)*I_0(2x), where I_0 is a Bessel function. - Michael Somos, Sep 09 2002
a(n) = 2*A027914(n) - 3^n. - Benoit Cloitre, Sep 28 2002
a(n) is asymptotic to d*3^n/sqrt(n) with d around 0.5.. - Benoit Cloitre, Nov 02 2002, d = sqrt(3/Pi)/2 = 0.4886025119... - Alec Mihailovs (alec(AT)mihailovs.com), Feb 24 2005
D-finite with recurrence: a(n) = ((2*n - 1)*a(n-1) + 3*(n - 1)*a(n-2))/n; a(0) = a(1) = 1; see paper by Barcucci, Pinzani and Sprugnoli.
Inverse binomial transform of A000984. - Vladeta Jovovic, Apr 28 2003
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, k/2)*(1 + (-1)^k)/2; a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*binomial(2*k, k). - Paul Barry, Jul 01 2003
a(n) = Sum_{k>=0} binomial(n, 2*k)*binomial(2*k, k). - Philippe Deléham, Dec 31 2003
a(n) = Sum_{i+j=n, 0<=j<=i<=n} binomial(n, i)*binomial(i, j). - Benoit Cloitre, Jun 06 2004
a(n) = 3*a(n-1) - 2*A005043(n). - Joost Vermeij (joost_vermeij(AT)hotmail.com), Feb 10 2005
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, n-k). - Paul Barry, Apr 23 2005
a(n) = (-1/4)^n*Sum_{k=0..n} binomial(2*k, k)*binomial(2*n-2*k, n-k)*(-3)^k. - Philippe Deléham, Aug 17 2005
a(n) = A111808(n,n). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..n} (((1 + (-1)^k)/2)*Sum_{i=0..floor((n-k)/2)} binomial(n, i)*binomial(n-i, i+k)*((k + 1)/(i + k + 1))). - Paul Barry, Sep 23 2005
a(n) = 3^n*Sum_{j=0..n} (-1/3)^j*C(n, j)*C(2*j, j); follows from (a) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/2)^n*Sum_{j=0..n} 3^j*binomial(n, j)*binomial(2*n-2*j, n) = (3/2)^n*Sum_{j=0..n} (1/3)^j*binomial(n, j)*binomial(2*j, n); follows from (c) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/Pi)*Integral_{x=-1..3} x^n/sqrt((3 - x)*(1 + x)) is moment representation. - Paul Barry, Sep 10 2007
G.f.: 1/(1 - x - 2x^2/(1 - x - x^2/(1 - x - x^2/(1 - ... (continued fraction). - Paul Barry, Aug 05 2009
a(n) = sqrt(-1/3)*(-1)^n*hypergeometric([1/2, n+1], [1], 4/3). - Mark van Hoeij, Nov 12 2009
a(n) = (1/Pi)*Integral_{x=-1..1} (1 + 2*x)^n/sqrt(1 - x^2) = (1/Pi)*Integral_{t=0..Pi} (1 + 2*cos(t))^n. - Eli Wolfhagen, Feb 01 2011
In general, g.f.: 1/sqrt(1 - 2*a*x + x^2*(a^2 - 4*b)) = 1/(1 - a*x)*(1 - 2*x^2*b/(G(0)*(a*x - 1) + 2*x^2*b)); G(k) = 1 - a*x - x^2*b/G(k+1); for g.f.: 1/sqrt(1 - 2*x - 3*x^2) = 1/(1 - x)*(1 - 2*x^2/(G(0)*(x - 1) + 2*x^2)); G(k) = 1 - x - x^2/G(k+1), a = 1, b = 1; (continued fraction). - Sergei N. Gladkovskii, Dec 08 2011
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*binomial(2*n-3*k-1, n-3*k)*binomial(n, k). - Gopinath A. R., Feb 10 2012
G.f.: A(x) = x*B'(x)/B(x) where B(x) satisfies B(x) = x*(1 + B(x) + B(x)^2). - Vladimir Kruchinin, Feb 03 2013 (B(x) = x*A001006(x) - Michael Somos, Jul 08 2014)
G.f.: G(0), where G(k) = 1 + x*(2 + 3*x)*(4*k + 1)/(4*k + 2 - x*(2 + 3*x)*(4*k + 2)*(4*k + 3)/(x*(2 + 3*x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 29 2013
E.g.f.: exp(x) * Sum_{k>=0} (x^k/k!)^2. - Geoffrey Critzer, Sep 04 2013
G.f.: Sum_{n>=0} (2*n)!/n!^2*(x^(2*n)/(1 - x)^(2*n+1)). - Paul D. Hanna, Sep 21 2013
0 = a(n)*(9*a(n+1) + 9*a(n+2) - 6*a(n+3)) + a(n+1)*(3*a(n+1) + 4*a(n+2) - 3*a(n+3)) + a(n+2)*(-a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = hypergeometric([-n/2, (1-n)/2], [1], 4). - Peter Luschny, Sep 17 2014
a(n) = A132885(n,0), that is, a(n) = A132885(A002620(n+1)). - Altug Alkan, Nov 29 2015
a(n) = GegenbauerC(n,-n,-1/2). - Peter Luschny, May 07 2016
a(n) = 4^n*JacobiP[n,-n-1/2,-n-1/2,-1/2]. - Peter Luschny, May 13 2016
From Alexander Burstein, Oct 03 2017: (Start)
G.f.: A(4*x) = B(-x)*B(3*x), where B(x) is the g.f. of A000984.
G.f.: A(2*x)*A(-2*x) = B(x^2)*B(9*x^2).
G.f.: A(x) = 1 + x*M'(x)/M(x), where M(x) is the g.f. of A001006. (End)
a(n) = Sum_{i=0..n/2} n!/((n - 2*i)!*(i!)^2). [Cf. Lalo and Lalo link. It is Luschny's terminating hypergeometric sum.] - Shara Lalo and Zagros Lalo, Oct 03 2018
From Peter Bala, Feb 07 2022: (Start)
a(n)^2 = Sum_{k = 0..n} (-3)^(n-k)*binomial(2*k,k)^2*binomial(n+k,n-k) and has g.f. Sum_{n >= 0} binomial(2*n,n)^2*x^n/(1 + 3*x)^(2*n+1). Compare with the g.f. for a(n) given above by Hanna.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all prime p and positive integers n and k.
Conjecture: The stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all prime p >= 5 and positive integers n and k. (End)
a(n) = A005043(n) + A005717(n) for n >= 1. - Amiram Eldar, May 17 2024
For even n, a(n) = (n-1)!!* 2^{n/2}/ (n/2)!* 2F1(-n/2,-n/2;1/2;1/4). For odd n, a(n) = n!! *2^(n/2-1/2) / (n/2-1/2)! * 2F1(1/2-n/2,1/2-n/2;3/2;1/4). - R. J. Mathar, Mar 19 2025

A088218 Total number of leaves in all rooted ordered trees with n edges.

Original entry on oeis.org

1, 1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92378, 352716, 1352078, 5200300, 20058300, 77558760, 300540195, 1166803110, 4537567650, 17672631900, 68923264410, 269128937220, 1052049481860, 4116715363800, 16123801841550, 63205303218876, 247959266474052
Offset: 0

Views

Author

Michael Somos, Sep 24 2003

Keywords

Comments

Essentially the same as A001700, which has more information.
Note that the unique rooted tree with no edges has no leaves, so a(0)=1 is by convention. - Michael Somos, Jul 30 2011
Number of ordered partitions of n into n parts, allowing zeros (cf. A097070) is binomial(2*n-1,n) = a(n) = essentially A001700. - Vladeta Jovovic, Sep 15 2004
Hankel transform is A000027; example: Det([1,1,3,10;1,3,10,35;3,10,35,126; 10,35,126,462]) = 4. - Philippe Deléham, Apr 13 2007
a(n) is the number of functions f:[n]->[n] such that for all x,y in [n] if xA045992(n). - Geoffrey Critzer, Apr 02 2009
Hankel transform of the aeration of this sequence is A000027 doubled: 1,1,2,2,3,3,... - Paul Barry, Sep 26 2009
The Fi1 and Fi2 triangle sums of A039599 are given by the terms of this sequence. For the definitions of these triangle sums see A180662. - Johannes W. Meijer, Apr 20 2011
Alternating row sums of Riordan triangle A094527. See the Philippe Deléham formula. - Wolfdieter Lang, Nov 22 2012
(-2)*a(n) is the Z-sequence for the Riordan triangle A110162. For the notion of Z- and A-sequences for Riordan arrays see the W. Lang link under A006232 with details and references. - Wolfdieter Lang, Nov 22 2012
From Gus Wiseman, Jun 27 2021: (Start)
Also the number of integer compositions of 2n with alternating (or reverse-alternating) sum 0 (ranked by A344619). This is equivalent to Ran Pan's comment at A001700. For example, the a(0) = 1 through a(3) = 10 compositions are:
() (11) (22) (33)
(121) (132)
(1111) (231)
(1122)
(1221)
(2112)
(2211)
(11121)
(12111)
(111111)
For n > 0, a(n) is also the number of integer compositions of 2n with alternating sum 2.
(End)
Number of terms in the expansion of (x_1+x_2+...+x_n)^n. - César Eliud Lozada, Jan 08 2022

Examples

			G.f. = 1 + x + 3*x^2 + 10*x^3 + 35*x^4 + 126*x^5 + 462*x^6 + 1716*x^7 + ...
The five rooted ordered trees with 3 edges have 10 leaves.
..x........................
..o..x.x..x......x.........
..o...o...o.x..x.o..x.x.x..
..r...r....r....r.....r....
		

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

Same as A001700 modulo initial term and offset.
First differences are A024718.
Main diagonal of A071919 and of A305161.
A signed version is A110556.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A003242 counts anti-run compositions.
A025047 counts wiggly compositions (ascend: A025048, descend: A025049).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A106356 counts compositions by number of maximal anti-runs.
A124754 gives the alternating sum of standard compositions.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218 (this sequence), ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218 (this sequence), ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Magma
    [Binomial(2*n-1, n): n in [0..30]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    seq(binomial(2*n-1, n),n=0..24); # Peter Luschny, Sep 22 2014
  • Mathematica
    a[ n_] := SeriesCoefficient[(1 - x)^-n, {x, 0, n}];
    c = (1 - (1 - 4 x)^(1/2))/(2 x);CoefficientList[Series[1/(1-(c-1)),{x,0,20}],x] (* Geoffrey Critzer, Dec 02 2010 *)
    Table[Binomial[2 n - 1, n], {n, 0, 20}] (* Vincenzo Librandi, Aug 07 2014 *)
    a[ n_] := If[ n < 0, 0, With[ {m = 2 n}, m! SeriesCoefficient[ (1 + BesselI[0, 2 x]) / 2, {x, 0, m}]]]; (* Michael Somos, Nov 22 2014 *)
  • PARI
    {a(n) = sum( i=0, n, binomial(n+i-2,i))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + 1 / sqrt(1 - 4*x + x * O(x^n))) / 2, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - x + x * O(x^n))^n, n))};
    
  • PARI
    {a(n) = if( n<0, 0, binomial( 2*n - 1, n))};
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( subst((1 - x) / (1 - 2*x), x, serreverse( x - x^2 + x * O(x^n))), n))};
    
  • Sage
    def A088218(n):
        return rising_factorial(n,n)/falling_factorial(n,n)
    [A088218(n) for n in (0..24)]  # Peter Luschny, Nov 21 2012
    

Formula

G.f.: (1 + 1 / sqrt(1 - 4*x)) / 2.
a(n) = binomial(2*n - 1, n).
a(n) = (n+1)*A000108(n)/2, n>=1. - B. Dubalski (dubalski(AT)atr.bydgoszcz.pl), Feb 05 2002 (in A060150)
a(n) = (0^n + C(2n, n))/2. - Paul Barry, May 21 2004
a(n) is the coefficient of x^n in 1 / (1 - x)^n and also the sum of the first n coefficients of 1 / (1 - x)^n. Given B(x) with the property that the coefficient of x^n in B(x)^n equals the sum of the first n coefficients of B(x)^n, then B(x) = B(0) / (1 - x).
G.f.: 1 / (2 - C(x)) = (1 - x*C(x))/sqrt(1-4*x) where C(x) is g.f. for Catalan numbers A000108. Second equation added by Wolfdieter Lang, Nov 22 2012.
From Paul Barry, Nov 02 2004: (Start)
a(n) = Sum_{k=0..n} binomial(2*n, k)*cos((n-k)*Pi);
a(n) = Sum_{k=0..n} binomial(n, (n-k)/2)*(1+(-1)^(n-k))*cos(k*Pi/2)/2 (with interpolated zeros);
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*cos((n-2*k)*Pi/2) (with interpolated zeros); (End)
a(n) = A110556(n)*(-1)^n, central terms in triangle A110555. - Reinhard Zumkeller, Jul 27 2005
a(n) = Sum_{0<=k<=n} A094527(n,k)*(-1)^k. - Philippe Deléham, Mar 14 2007
From Paul Barry, Mar 29 2010: (Start)
G.f.: 1/(1-x/(1-2x/(1-(1/2)x/(1-(3/2)x/(1-(2/3)x/(1-(4/3)x/(1-(3/4)x/(1-(5/4)x/(1-... (continued fraction);
E.g.f.: (of aerated sequence) (1 + Bessel_I(0, 2*x))/2. (End)
a(n + 1) = A001700(n). a(n) = A024718(n) - A024718(n - 1).
E.g.f.: E(x) = 1+x/(G(0)-2*x) ; G(k) = (k+1)^2+2*x*(2*k+1)-2*x*(2*k+3)*((k+1)^2)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 21 2011
a(n) = Sum_{k=0..n}(-1)^k*binomial(2*n,n+k). - Mircea Merca, Jan 28 2012
a(n) = rf(n,n)/ff(n,n), where rf is the rising factorial and ff the falling factorial. - Peter Luschny, Nov 21 2012
D-finite with recurrence: n*a(n) +2*(-2*n+1)*a(n-1) = 0. - R. J. Mathar, Dec 04 2012
a(n) = hypergeom([1-n,-n],[1],1). - Peter Luschny, Sep 22 2014
G.f.: 1 + x/W(0), where W(k) = 4*k+1 - (4*k+3)*x/(1 - (4*k+1)*x/(4*k+3 - (4*k+5)*x/(1 - (4*k+3)*x/W(k+1) ))) ; (continued fraction). - Sergei N. Gladkovskii, Nov 13 2014
a(n) = A000984(n) + A001791(n). - Gus Wiseman, Jun 28 2021
E.g.f.: (1 + exp(2*x) * BesselI(0,2*x)) / 2. - Ilya Gutkovskiy, Nov 03 2021
From Amiram Eldar, Mar 12 2023: (Start)
Sum_{n>=0} 1/a(n) = 5/3 + 4*Pi/(9*sqrt(3)).
Sum_{n>=0} (-1)^n/a(n) = 3/5 - 8*log(phi)/(5*sqrt(5)), where phi is the golden ratio (A001622). (End)
a(n) ~ 2^(2*n-1)/sqrt(n*Pi). - Stefano Spezia, Apr 17 2024

A180281 Triangle read by rows: T(n,k) = number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to k.

Original entry on oeis.org

1, 1, 2, 1, 6, 3, 1, 18, 12, 4, 1, 50, 50, 20, 5, 1, 140, 195, 90, 30, 6, 1, 392, 735, 392, 147, 42, 7, 1, 1106, 2716, 1652, 672, 224, 56, 8, 1, 3138, 9912, 6804, 2970, 1080, 324, 72, 9, 1, 8952, 35850, 27600, 12825, 4950, 1650, 450, 90, 10, 1, 25652, 128865, 110715, 54450, 22022, 7865, 2420, 605, 110, 11
Offset: 1

Views

Author

R. H. Hardin, Aug 24 2010

Keywords

Comments

To clarify a slight ambiguity in the definition, the heaviest box in such an arrangement should contain exactly k balls. - Gus Wiseman, Sep 22 2016

Examples

			The T(4,2)=18 arrangements are {0022, 0112, 0121, 0202, 0211, 0220, 1012, 1021, 1102, 1120, 1201, 1210, 2002, 2011, 2020, 2101, 2110, 2200}.
Triangle starts
  1
  1   2
  1   6   3
  1  18  12  4
  1  50  50 20  5
  1 140 195 90 30 6
  ...
		

Crossrefs

Row sums give A088218.
T(n,ceiling(n/2)) gives A318160.
T(2n,n) gives A318161.
T(2n-1,n) gives A318161.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k))))
        end:
    T:= (n, k)-> b(n$2, k)-b(n$2, k-1):
    seq(seq(T(n,k), k=1..n), n=1..12);  # Alois P. Heinz, Aug 16 2018
    # second Maple program:
    T:= (n, k)-> coeff(series(((x^(k+1)-1)/(x-1))^n
                 -((x^k-1)/(x-1))^n, x, n+1), x, n):
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Aug 17 2018
  • Mathematica
    T[n_,k_]:=Select[Tuples[Range[0,k],n],And[Max[#]===k,Total[#]===n]&]; (* Gus Wiseman, Sep 22 2016 *)
    SequenceForm@@@T[4,2] (* example *)
    Join@@Table[Length[T[n,k]],{n,1,6},{k,1,n}] (* sequence *)
    (* Second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, 0, Sum[b[n-j, i-1, k], {j, 0, Min[n, k]}]]];
    T[n_, k_] := b[n, n, k] - b[n, n, k-1];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Aug 28 2022, after Alois P. Heinz *)

Formula

Empirical: right half of table, T(n,k) = n*binomial(2*n-k-2,n-2) for 2*k > n; also, T(n,2) = Sum_{j=1..n} binomial(n,j)*binomial(n-j,j) = 2*A097861(n). - Robert Gerbicz in the Sequence Fans Mailing List
From Alois P. Heinz, Aug 17 2018: (Start)
T(n,k) = [x^n] ((x^(k+1)-1)/(x-1))^n - ((x^k-1)/(x-1))^n.
T(n,k) = A305161(n,k) - A305161(n,k-1). (End)

A005725 Quadrinomial coefficients.

Original entry on oeis.org

1, 1, 3, 10, 31, 101, 336, 1128, 3823, 13051, 44803, 154518, 534964, 1858156, 6472168, 22597760, 79067375, 277164295, 973184313, 3422117190, 12049586631, 42478745781, 149915252028, 529606271560, 1872653175556, 6627147599476, 23471065878276, 83186110269928
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^n in (1+x+x^2+x^3)^n.
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2), (1,3). - Joerg Arndt, Jul 05 2011

Examples

			For n=2, (x^3 + x^2 + x + 1)^2 = x^6 + 2x^5 + 3x^4 + 4x^3 + 3x^2 + 2x + 1, and the coefficient of x^n = x^2 is 3, so a(2) = 3. - _Michael B. Porter_, Aug 15 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A008287.
Column k=3 of A305161.

Programs

  • Magma
    P:=PolynomialRing(Integers()); [ Coefficients((1+x+x^2+x^3)^n)[n+1]: n in [0..25] ]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    seq(add(binomial(n,2*k)*binomial(n,k), k=0..floor(n/2)), n=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    a := n -> add(binomial(n,j)*binomial(n,2*j),j=0..n): seq(a(n), n=1..25); # Zerinvary Lajos, Feb 12 2007
    seq(coeff(series(RootOf((16*x^3+8*x^2+11*x-4)*A^3+(3-2*x)*A+1, A), x=0, n+1), x, n), n=0..30);  # Mark van Hoeij, Apr 30 2013
  • Mathematica
    a[n_] := Coefficient[(1+x+x^2+x^3)^n, x^n]; a[0] = 1; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 15 2011 *)
    Table[HypergeometricPFQ[{1/2 - n/2, -n, -n/2}, {1/2, 1}, -1], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 04 2016 *)
  • Maxima
    quadrinomial(n,k):=coeff(expand((1+x+x^2+x^3)^n),x,k); makelist(quadrinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • PARI
    a(n)=my(x='x); polcoeff((x^3+x^2+x+1)^n,n) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from math import comb
    def A005725(n): return sum((-1 if k&1 else 1)*comb(n,k)*comb((n-(k<<1)<<1)-1,n-(k<<2)) for k in range((n>>2)+1)) if n else 1 # Chai Wah Wu, Aug 09 2025

Formula

a(n) = Sum_{i+j+k=n, 0<=k<=j<=i<=n} C(n,i)*C(i,j)*C(j,k). - Benoit Cloitre, Jun 06 2004
G.f.: A(x) where (16*x^3+8*x^2+11*x-4)*A(x)^3+(3-2*x)*A(x)+1 = 0. - Mark van Hoeij, Apr 30 2013
Recurrence: 2*n*(2*n-1)*(13*n-19)*a(n) = (143*n^3 - 352*n^2 + 251*n - 54)*a(n-1) + 4*(n-1)*(26*n^2 - 51*n + 15)*a(n-2) + 16*(n-2)*(n-1)*(13*n-6)*a(n-3). - Vaclav Kotesovec, Aug 10 2013
a(n) ~ sqrt((39+7*39^(2/3)/c+39^(1/3)*c)/156) * ((b+11+217/b)/12)^n/sqrt(Pi*n), where b = (6371+624*sqrt(78))^(1/3), c = (117+2*sqrt(78))^(1/3). - Vaclav Kotesovec, Aug 10 2013
a(n) = A008287(n, n). - Sean A. Irvine, Aug 15 2016
a(n) = hypergeom([1/2-n/2, -n, -n/2], [1/2, 1], -1). - Vladimir Reshetnikov, Oct 04 2016
From Peter Bala, Mar 31 2020: (Start)
a(n) = Sum_{k = 0..floor(n/4)} (-1)^k*C(n,k)*C(2*n-4*k-1,n-4*k).
a(p) == 1 (mod p^2) for any prime p >= 3. More generally, we may have a(p^k) == a(p^(k-1)) (mod p^(2*k)) for k >= 2 and any prime p >= 3.
The sequence defined by b(n) := [x^n] ( F(x)/F(-x) )^n, where F(x) = 1 + x + x^2 + x^3, may satisfy the stronger supercongruences b(p) == 2 (mod p^3) for prime p >= 5 (checked up to p = 499). (End)
a(n) = Sum_{k = 0..floor(n/2)} binomial(n,k)*binomial(n,2*k). - Peter Bala, Mar 16 2023

Extensions

More terms from James Sellers, Jul 12 2000

A048775 Number of (partially defined) monotone maps from intervals of 1..n to 1..n.

Original entry on oeis.org

1, 7, 31, 121, 456, 1709, 6427, 24301, 92368, 352705, 1352066, 5200287, 20058286, 77558745, 300540179, 1166803093, 4537567632, 17672631881, 68923264390, 269128937199, 1052049481838, 4116715363777, 16123801841526, 63205303218851, 247959266474026, 973469712824029
Offset: 1

Views

Author

Stephen C. Power (s.power(AT)lancaster.ac.uk)

Keywords

Comments

More precisely, number of ways to pick a subinterval [i,i+1,...,j] of [1..n] and to map it to a nondecreasing sequence of the same length with symbols from [1..n]. If s is the length of the subinterval (1 <= s <= n), there are n+1-s ways to choose the subinterval and binomial(n+s-1,s) ways to choose the sequence, for a total of Sum_{s=1..n} (n+1-s)*binomial(n+s-1,s) = binomial(2*n+1, n+1)-(n+1) ways. - N. J. A. Sloane, Feb 02 2009
Arises in the classification of endomorphisms of certain finite-dimensional operator algebras.
Equals binomial transform of A163765 (using a different offset). - Gary W. Adamson, Aug 03 2009
From David Spivak, Dec 12 2012: (Start)
Number of morphisms of full subcategories of Simplex category.
A finite nonempty linear order of size m is isomorphic to [m]:={0,1,...,m}. The weakly monotone maps [k]->[m] form a category, often called the simplex category and denoted Delta. For m starting at -1, let D_m denote the full subcategory of Delta, spanned by objects {[0],[1],...,[m]}. The number of morphisms in D_m is a(n+1).
(End)
This sequence is the bisection of the 1st column of the triangle defined by T(n,k) = 1 if n=0 else T(n,k) = binomial(n-1,k2-1)-binomial(k2,k-1) where k2 = binomial(n,k) mod n. - Nikita Sadkov, Oct 08 2018

Examples

			a(2) = 7 because there are two maps with domain {1}, two with domain {2} and three maps with domain {1,2}.
When n=2, we are looking at the full subcategory of Delta spanned by [0],[1]. There is one monotone map [0]->[0], one monotone map [1]->[0], two monotone maps [0]->[1], and three monotone maps [1]->[1] (namely (0,0), (0,1), (1,1)). The total is 1+1+2+3=7. - _David Spivak_, Dec 12 2013
		

Crossrefs

Programs

  • GAP
    List([1..26],n->Binomial(2*n+1,n+1)-(n+1)); # Muniru A Asiru, Oct 09 2018
    
  • Magma
    [Binomial(2*n+1, n+1)-(n+1): n in [1..30]]; // Vincenzo Librandi, Oct 10 2018
  • Maple
    seq(coeff(series(factorial(n)*(exp(2*x)*(BesselI(0,2*x)+BesselI(1,2*x))-exp(x)*(1+x)),x,n+1), x, n), n = 1 .. 26); # Muniru A Asiru, Oct 09 2018
  • Mathematica
    Table[Binomial[2n+1,n+1]-(n+1),{n,30}] (* Harvey P. Dale, Feb 08 2013 *)
    From Stefano Spezia, Oct 09 2018: (Start)
    a[n_]:=(1/2)*Sum[Sum[(i+j) !/(i !*j !),{i,1,n}],{j,1,n}]; Array[a, 50] (* or *)
    CoefficientList[Series[((1/(2*x))*(1/Sqrt[1-4*x]-1) - 1/(1-x)^2)/x, {x, 0, 50}], x] (* or *)
    CoefficientList[Series[(Exp[2*x]*(BesselI[0,2*x] + BesselI[1,2*x]) - Exp[x]*(1 + x))/x, {x, 0, 50}], x]*Table[(k+1) !, {k, 0, 50}]
    (End)
  • PARI
    Vec((1/(2*x))*(1/sqrt(1-4*x)-1) - 1/(1-x)^2 + O(x^15)) \\ Stefano Spezia, Oct 09 2018
    

Formula

a(n) = binomial(2*n+1, n+1)-(n+1) = A001700(n)-n-1.
a(n) = (1/2)*Sum[Sum[(i+j)!/(i!*j!),{i,1,n}],{j,1,n}]. - Alexander Adamchuk, Jul 04 2006; corrected by N. J. A. Sloane, Jan 30 2009
G.f.: (1/(2*x))*(1/sqrt(1-4*x)-1) - 1/(1-x)^2. - N. J. A. Sloane, Feb 02 2009
a(n) = Sum_{k=0..n} (n-k+1)*C(n+k+1,n) = [x^n](1+x)^n*F(-n-2,-n-1;1;x/(1+x)). - Paul Barry, Oct 01 2010
Conjecture: (n+1)*a(n) + (-7*n-2)*a(n-1) + 3*(5*n-3)*a(n-2) + (-13*n+20)*a(n-3) + 2*(2*n-5)*a(n-4) = 0. - R. J. Mathar, Nov 30 2012
a(n) = (1/2) * Sum_{k=1..n} Sum_{i=1..n} C(k+i,i). - Wesley Ivan Hurt, Sep 19 2017
E.g.f.: exp(2*x)*(BesselI(0,2*x) + BesselI(1,2*x)) - exp(x)*(1 + x). - Ilya Gutkovskiy, Sep 19 2017

Extensions

More terms from N. J. A. Sloane, Dec 15 2008

A187925 Coefficient of x^n in (1+x+x^2+x^3+x^4)^n.

Original entry on oeis.org

1, 1, 3, 10, 35, 121, 426, 1520, 5475, 19855, 72403, 265233, 975338, 3598180, 13311000, 49360405, 183424355, 682870587, 2546441085, 9509714340, 35561166195, 133138728845, 499005557515, 1872137642125, 7030166054250, 26421479140746, 99376657487396
Offset: 0

Views

Author

Emanuele Munarini, Mar 16 2011

Keywords

Crossrefs

Column k=4 of A305161.

Programs

  • Magma
    P:=PolynomialRing(Integers()); [Coefficients((1+x+x^2+x^3+x^4)^n)[n+1]: n in [0..26]]; // Vincenzo Librandi, Aug 09 2014
    
  • Mathematica
    Pentanomial[n_, k_] := If[k == 0, 1, Coefficient[(1 + x + x^2 + x^3 + x^4)^n, x^k]]
    Table[Pentanomial[n, n], {n, 0, 12}]
  • Maxima
    pentanomial(n,k):=coeff(expand((1+x+x^2+x^3+x^4)^n),x,k);
    makelist(pentanomial(n,n),n,0,12);
    
  • Maxima
    a(n):=sum(binomial(n,r)*sum((sum(binomial(j,-r+n-m-j)*binomial(m,j),j,0,m))*binomial(r,m),m,0,r),r,0,n); /* Vladimir Kruchinin, Feb 03 2013 */
    
  • Maxima
    a(n):=sum((-1)^i*binomial(n,i)*binomial(2*n-5*i-1,n-5*i),i,0,n/5); /* Vladimir Kruchinin, Mar 28 2019 */
    
  • PARI
    a(n) = polcoeff((1+x+x^2+x^3+x^4)^n, n); \\ Michel Marcus, Aug 09 2014

Formula

a(n) = sum(r=0..n, binomial(n,r)*sum(m=0..r, (sum(j=0..m, binomial(j,-r+n-m-j)*binomial(m,j)))*binomial(r,m))). [Vladimir Kruchinin, Feb 03 2013]
G.f.: 1 + x*G'(x)/G(x) where G(x) is the g.f. of A036766. - Paul D. Hanna, Feb 03 2013
Recurrence: 3*n*(3*n-2)*(3*n-1)*(748*n^3 - 4136*n^2 + 7291*n - 4135)*a(n) = 2*(35156*n^6 - 247126*n^5 + 663756*n^4 - 870079*n^3 + 584710*n^2 - 190393*n + 23280)*a(n-1) + 5*(n-1)*(2244*n^5 - 14652*n^4 + 32367*n^3 - 28501*n^2 + 8564*n - 672)*a(n-2) + 100*(n-2)*(n-1)*(374*n^4 - 1881*n^3 + 2848*n^2 - 1475*n + 222)*a(n-3) + 125*(n-3)*(n-2)*(n-1)*(748*n^3 - 1892*n^2 + 1263*n - 232)*a(n-4). - Vaclav Kotesovec, Feb 11 2015
a(n) ~ c * d^n / sqrt(n), where d = 3.83443724902880556376524112660950145464... is the root of the equation -125-50*d-15*d^2-94*d^3+27*d^4 = 0, c = 0.3404440985692437948910444085315314358395... . - Vaclav Kotesovec, Feb 11 2015
a(n) = Sum_{i=0..n/5} (-1)^i*C(n,i)*C(2*n-5*i-1,n-5*i). - Vladimir Kruchinin, Mar 28 2019
From Peter Bala, Mar 31 2020: (Start)
a(p) == 1 (mod p^2) for any prime p > 5 (follows from Kruchinin's formula above). Cf. A002426. More generally, we may have a(p^k) == a(p^(k-1)) (mod p^(2*k)) for k >= 2 and any prime p.
The sequence b(n) := [x^n] ( F(x)/F(-x) )^n = [x^n] ( F(x)^2/F(x^2) )^n, where F(x) = 1 + x + x^2 + x^3 + x^4, may satisfy the stronger congruences b(p) == 2 (mod p^3) for prime p > 5 (checked up to p = 499). (End)

A167403 Number of decimal numbers having n or fewer digits and having the sum of their digits equal to n.

Original entry on oeis.org

1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92368, 352595, 1351142, 5194385, 20024980, 77384340, 299671971, 1162635441, 4518099300, 17583582225, 68522664400, 267350823015, 1044243559263, 4082760176300, 15977236602150, 62576817828876, 245279492151021
Offset: 1

Views

Author

Alois P. Heinz, Nov 02 2009

Keywords

Comments

a(3) = 10, because 10 decimal numbers have 3 or fewer digits and a digit sum of 3: 3, 30, 300, 12, 120, 201, 21, 210, 102, 111.

Crossrefs

Column k=9 of A305161.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i=0, 0,
           add(b(n-j, i-1), j=0..min(n, 9)) ))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=1..30);

Formula

a(n) = [x^n] ((x^10-1)/(x-1))^n.

A318114 Number of compositions of n into exactly n nonnegative parts <= six.

Original entry on oeis.org

1, 1, 3, 10, 35, 126, 462, 1709, 6371, 23905, 90178, 341705, 1299662, 4958968, 18973111, 72763785, 279636451, 1076635399, 4151948115, 16035014604, 62009441410, 240083933750, 930547077155, 3610295962089, 14019766334990, 54487995870126, 211931334450696
Offset: 0

Views

Author

Alois P. Heinz, Aug 17 2018

Keywords

Crossrefs

Column k=6 of A305161.
Cf. A088218.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1), j=0..min(n, 6))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);

Formula

a(n) = [x^n] ((x^7-1)/(x-1))^n.
a(n) <= A088218(n) with equality only for n < 7.
From Peter Bala, Mar 31 2020: (Start)
a(n) = Sum_{i=0..n/7} (-1)^i*C(n,i)*C(2*n-7*i-1,n-7*i).
a(p) == 1 (mod p^2) for any prime p > 7.
More generally, we may have a(p^k) == a(p^(k-1)) (mod p^(2*k)) for k >= 2 and any prime p.
The sequence b(n) := [x^n] ( F(x)/F(-x) )^n, where F(x) = (x^7 - 1)/(x - 1), may satisfy the stronger congruences b(p) == 2 (mod p^3) for prime p > 7 (checked up to p = 499). (End)

A348476 Number of compositions of n into exactly n nonnegative parts such that all positive parts are odd.

Original entry on oeis.org

1, 1, 1, 4, 13, 36, 106, 323, 981, 2992, 9196, 28392, 87946, 273287, 851579, 2659764, 8324357, 26100560, 81969496, 257800532, 811862268, 2559731360, 8079294664, 25525787344, 80719066698, 255466082911, 809138591431, 2564605664428, 8134003910311, 25813957574292
Offset: 0

Views

Author

Alois P. Heinz, Oct 19 2021

Keywords

Examples

			a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [1,1].
a(3) = 4: [3,0,0], [0,3,0], [0,0,3], [1,1,1].
a(4) = 13: [3,1,0,0], [3,0,1,0], [3,0,0,1], [1,3,0,0], [0,3,1,0], [0,3,0,1],[1,0,3,0], [0,1,3,0], [0,0,3,1], [1,0,0,3], [0,1,0,3], [0,0,1,3], [1,1,1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(`if`(j=0 or j::odd, b(n-j, t-1), 0), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
         Sum[If[j == 0 || OddQ[j], b[n - j, t - 1], 0], {j, 0, n}]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 16 2022, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / sqrt(Pi*n), where d = 3.22870495109450172934784925586... is largest positive root of the equation 4*d^4 - 12*d^3 + 4*d^2 - 24*d + 5 = 0 and c = 0.4302331663731241127284415754... is positive root of the equation 5824*c^8 - 32*c^4 - 4*c^2 - 5 = 0. - Vaclav Kotesovec, Nov 01 2021

A318113 Number of compositions of n into exactly n nonnegative parts <= five.

Original entry on oeis.org

1, 1, 3, 10, 35, 126, 456, 1667, 6147, 22825, 85228, 319683, 1203632, 4546270, 17218995, 65372310, 248705155, 947926359, 3618884895, 13836004764, 52968655260, 203022926480, 779008308235, 2992051471500, 11502445734096, 44256184906376, 170408995261326
Offset: 0

Views

Author

Alois P. Heinz, Aug 17 2018

Keywords

Crossrefs

Column k=5 of A305161.
Cf. A088218.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1), j=0..min(n, 5))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);

Formula

a(n) = [x^n] ((x^6-1)/(x-1))^n.
a(n) <= A088218(n) with equality only for n < 6.
a(n) = Sum_{k=0..floor(n/6)} (-1)^k * binomial(n,k) * binomial(2*n-6*k-1,n-6*k). - Ilya Gutkovskiy, Nov 03 2021
Showing 1-10 of 14 results. Next