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.

A082758 Sum of the squares of the trinomial coefficients (A027907).

Original entry on oeis.org

1, 3, 19, 141, 1107, 8953, 73789, 616227, 5196627, 44152809, 377379369, 3241135527, 27948336381, 241813226151, 2098240353907, 18252025766941, 159114492071763, 1389754816243449, 12159131877715993, 106542797484006471, 934837217271732457, 8212609533895771131
Offset: 0

Views

Author

Emanuele Munarini, May 21 2003

Keywords

Comments

a(n) = T(2*n, 2*n), the coefficient of x^(2*n) in (1+x+x^2)^(2*n), where T is the trinomial triangle A027907; Integral representation: a(n) = (1/Pi) * Integral_{x=-1..1} ((1+2*x)^(2*n)/sqrt(1-x^2)), i.e., a(n) is the moment of order 2n of the random variable 1+2X, where the distribution of X is an arcsin law on the interval (-1,1). - N-E. Fahssi, Jan 22 2008

Examples

			G.f. = 1 + 3*x + 19*x^2 + 141*x^3 + 1107*x^4 + 8953*x^5 + 73789*x^6 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 77. (In the integral formula a left bracket is missing for the cosine argument.)

Crossrefs

Programs

  • Maple
    a := n -> simplify(GegenbauerC(2*n,-2*n,-1/2)):
    seq(a(n), n=0..19); # Peter Luschny, May 07 2016
  • Mathematica
    Table[Sum[(-1)^(i)*Binomial[2*n,i]*Binomial[4*n-3*i-1,2*n-3*i],{i,0,2*n/3}],{n, 0,25}] (* Adi Dani, Jul 03 2011 *)
    Table[Hypergeometric2F1[1/2-n,-n,1,4], {n,0,19}] (* Peter Luschny, May 15 2016 *)
    a[ n_] := SeriesCoefficient[ (1 - 2 x - 3 x^2)^(-1/2), {x, 0, 2 n}]; (* Michael Somos, Jan 08 2017 *)
  • Maxima
    makelist(sum(binomial(2*n-k, k)*binomial(2*n, k),k,0,n),n,0,40);
    
  • PARI
    a(n)={local(v=Vec((1+x+x^2)^n));sum(k=1,#v,v[k]^2);}
    
  • PARI
    a(n)=sum(k=0,n,binomial(2*n-k,k)*binomial(2*n,k));
    
  • PARI
    {a(n)=sum(k=0,n,binomial(n,k)^2*binomial(2*n,n)/binomial(2*k,k))} \\ Paul D. Hanna, Sep 29 2012
    
  • Sage
    def A():
        a, b, n = 1, 3, 1
        yield a
        while True:
            yield b
            n += 1
            a, b = b, ((9-9*n)*(4*n-1)*(2*n-3)*a+(4*n-3)*(20*n^2-30*n+7)*b)//(n*(2*n-1)*(4*n-5))
    A082758 = A()
    print([next(A082758) for  in range(20)]) # _Peter Luschny, May 16 2016

Formula

a(n) = Sum_{k=0..2n} T(n, k)^2, where T(n, k) are trinomial coefficients (A027907).
a(n) = Sum_{k=0..n} binomial(2*n-k, k)*binomial(2*n, k). - Benoit Cloitre, Jul 30 2003
G.f.: (1/sqrt(1+2*x-3*x^2) + 1/sqrt(1-2*x-3*x^2))/2 (with interpolated zeros). - Paul Barry, Jan 04 2005
a(n) = Sum_{k=0..n} binomial(2*n,2*k)*binomial(2*k,k) = Sum_{k=0..n} binomial(n+k,2k)*binomial(2*n,n+k). - Paul Barry, Dec 16 2008
a(n) = Sum_{k=0..n} binomial(n,k)^2*binomial(2*n,n)/ binomial(2*k,k). - Paul D. Hanna, Sep 29 2012
Recurrence: n*(2*n-1)*a(n) = (14*n^2+n-12)*a(n-1) + 3*(14*n^2-71*n+78)*a(n-2) - 27*(n-2)*(2*n-5)*a(n-3). - Vaclav Kotesovec, Oct 14 2012
a(n) ~ 3^(2*n+1/2)/(2*sqrt(2*Pi*n)). - Vaclav Kotesovec, Oct 14 2012
a(n) = GegenbauerC(2*n, -2*n, -1/2). - Peter Luschny, May 07 2016
From Peter Luschny, May 15 2016: (Start)
a(n) = ((9-9*n)*(4*n-1)*(2*n-3)*a(n-2)+(4*n-3)*(20*n^2-30*n+7)*a(n-1))/(n*(2*n-1)*(4*n-5)) for n>=2.
a(n) = hypergeom([1/2-n, -n], [1], 4). (End)
a(n) = A002426(2*n). - Michael Somos, Jan 08 2017
From Peter Bala, Mar 16 2018: (Start)
a(n) = sqrt(-3)^(2*n)*P(2*n,-1/sqrt(-3)), where P(n,x) is the Legendre polynomial of degree n.
a(n) = 1/C(2*n,n)*Sum_{k = 0..n} C(n,k)*C(n+k,k)*C(2*n+2*k,n+k)*(-3)^(n-k). Cf. A273055. (End)
From Wolfdieter Lang, Apr 19 2018 : (Start)
a(n) = (2/Pi)*Integral_{phi=0..Pi/2} (sin(3*phi)/sin(phi))^(2*n) [Comtet, p. 77, q=3, n=k -> 2*n] = (2/Pi)*Integral_{x=0..2} (x^2 - 1)^(2*n)/sqrt(4-x^2) (with x = 2*cos(phi)). See also the integral of the above comment.
a(n) = 3^(2*n)*Sum_{k=0..2*n} binomial(2*n, k)*binomial(2*k, k)*(-1/3)^k = 3^(2*n)*hypergeometric([-2*n, 1/2], [1], 4/3) = (-3)^n*LegendreP(2*n, 1/sqrt(-3)). (End)
From Peter Bala, Apr 03 2022: (Start)
Conjecture: a(n) = [x^n] ( (1 + x + x^3 + x^4)/(1 - x)^2 )^n.
If the conjecture is true then the Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k. [added Aug 29 2025: The conjecture is true. The conjecture leads to the double sum representation a(n) = Sum_{j, k} binomial(n, k)*binomial(n, j)*binomial(3*n-3*j-k-1, n-3*j-k), which satisfies the second-order recurrence given above by Peter Luschny, as can be verified using the MulZeil procedure in Doron Zeilberger's MultiZeilberger Maple package.]
Calculation suggests that the supercongruence a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) holds for primes p >= 5 and positive integers n and k.
Column 1 of A337389. (End)