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-7 of 7 results.

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)

A245926 Expansion of g.f. sqrt( (1-x + sqrt(1-14*x+x^2)) / (2*(1-14*x+x^2)) ).

Original entry on oeis.org

1, 5, 51, 587, 7123, 89055, 1135005, 14660805, 191253843, 2513963567, 33244446601, 441772827105, 5894323986301, 78912561223553, 1059543126891027, 14261959492731387, 192392702881384275, 2600355510685245087, 35206018016510388345, 477377227987055971905
Offset: 0

Views

Author

Paul D. Hanna, Aug 15 2014

Keywords

Comments

Square each term to form a bisection of A245925.
Limit a(n+1)/a(n) = 7 + 4*sqrt(3).

Examples

			G.f.: A(x) = 1 + 5*x + 51*x^2 + 587*x^3 + 7123*x^4 + 89055*x^5 +...
where
A(x)^2 = (1-x + sqrt(1-14*x+x^2)) / (2*(1-14*x+x^2)).
Explicitly,
A(x)^2 = 1 + 10*x + 127*x^2 + 1684*x^3 + 22717*x^4 + 309214*x^5 + 4231675*x^6 + 58117672*x^7 + 800173945*x^8 +...+ A245923(n)*x^n +...
		

Crossrefs

Column k=3 of A337389.

Programs

  • Maple
    A245926 := n -> sqrt(add(binomial(4*n-2*k, 2*n-k)*binomial(4*n-k, k)^2, k=0..2*n)); seq(A245926(n), n=0..20); # Peter Luschny, Aug 17 2014
  • Mathematica
    CoefficientList[Series[Sqrt[(1 - x + Sqrt[1 - 14*x + x^2])/(2*(1 - 14*x + x^2))], {x,0,50}], x] (* G. C. Greubel, Jan 29 2017 *)
    a[n_] := (-1)^n Hypergeometric2F1[-n, n + 1/2, 1, 4];
    Table[a[n], {n, 0, 19}] (* Peter Luschny, Mar 16 2018 *)
  • PARI
    /* From definition: */
    {a(n)=polcoeff( sqrt( (1-x + sqrt(1-14*x+x^2 +x*O(x^n))) / (2*(1-14*x+x^2 +x*O(x^n))) ), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From formula for a(n)^2: */
    {a(n)=sqrtint(sum(k=0, 2*n, sum(j=0, 4*n-2*k, (-1)^(j+k)*binomial(4*n-k,j+k)^2*binomial(j+k, k)^2)))}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From formula for a(n)^2: */
    {a(n) = sqrtint( sum(k=0, 2*n, binomial(2*k, k)^2*binomial(2*n+k, 2*n-k)*(-1)^k) )}
    for(n=0, 20, print1(a(n), ", "))

Formula

a(n)^2 = Sum_{k=0..2*n} Sum_{j=0..4*n-2*k} (-1)^(j+k) * C(4*n-k,j+k)^2 * C(j+k,k)^2.
a(n) ~ (3*sqrt(3)-5) * (7+4*sqrt(3))^(n+1) / (4*sqrt(Pi*n)). - Vaclav Kotesovec, Aug 16 2014
a(n)^2 = C(4*n,2*n)*hyper4F3([-2*n,-2*n,-2*n,-2*n+1/2],[1,-4*n,-4*n],4). - Peter Luschny, Aug 17 2014
a(n)^2 = Sum_{k=0..2*n} binomial(4*n-2*k, 2*n-k)*binomial(4*n-k, k)^2. - Peter Luschny, Aug 17 2014
a(n)^2 = Sum_{k=0..2*n} (-1)^k * C(2*k, k)^2 * C(2*n+k, 2*n-k). - Paul D. Hanna, Aug 17 2014
From Peter Bala, Mar 14 2018: (Start)
a(n) = (-1)^n*P(2*n,sqrt(-3)), where P(n,x) denotes the n-th Legendre polynomial. See A008316.
a(n) = (1/C(2*n,n))*Sum_{k = 0..n} (-1)^(n+k)*C(n,k)*C(n+k,k)* C(2*n+2*k,n+k) = Sum_{k = 0..n} (-1)^(n+k)*C(2*k,k)*C(n,k) *C(2*n+2*k,2*n)/C(n+k,n). In general, P(2*n,sqrt(1+4*x)) = (1/C(2*n,n))*Sum_{k = 0..n} C(n,k)*C(n+k,k)*C(2*n+2*k,n+k) *x^k.
a(n) = Sum_{k = 0..2*n} C(2*n,k)^2 * u^(n-k), where u = (1 - sqrt(-3))/2 is a primitive sixth root of unity.
a(n) = (-1)^n*Sum_{k = 0..2*n} C(2*n,k)*C(2*n+k,k)*u^(2*k).
(End)
a(n) = (-1)^n*hypergeom([-n, n + 1/2], [1], 4). - Peter Luschny, Mar 16 2018
a(0) = 1, a(1) = 5 and n * (2*n-1) * (4*n-5) * a(n) = (4*n-3) * (28*n^2-42*n+9) * a(n-1) - (n-1) * (2*n-3) * (4*n-1) * a(n-2) for n > 1. - Seiichi Manyama, Aug 28 2020
From Peter Bala, May 03 2022: (Start)
Conjecture: a(n) = [x^n] ( (1 + x + x^2)*(1 + x)^2/(1 - x)^2 )^n. Equivalently, a(n) = Sum_{k = 0..n} Sum_{i = 0..k} Sum_{j = 0..n-k-i} C(n, k)*C(k, i)*C(2*n, j)*C(3*n-k-i-j-1, n-k-i-j).
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. Calculation suggests that the supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for primes p >= 5 and positive integers n and k. (End)

A337419 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of sqrt((1-(k+4)*x+sqrt(1+2*(k-4)*x+((k+4)*x)^2)) / (2 * (1+2*(k-4)*x+((k+4)*x)^2))).

Original entry on oeis.org

1, 1, 2, 1, 1, 6, 1, 0, -5, 20, 1, -1, -14, -41, 70, 1, -2, -21, -48, -125, 252, 1, -3, -26, -7, 198, 131, 924, 1, -4, -29, 76, 739, 2080, 3301, 3432, 1, -5, -30, 195, 1222, 1629, 1780, 15625, 12870, 1, -6, -29, 344, 1395, -3772, -26859, -57120, 16115, 48620
Offset: 0

Views

Author

Seiichi Manyama, Aug 27 2020

Keywords

Examples

			Square array begins:
    1,    1,    1,    1,     1,      1, ...
    2,    1,    0,   -1,    -2,     -3, ...
    6,   -5,  -14,  -21,   -26,    -29, ...
   20,  -41,  -48,   -7,    76,    195, ...
   70, -125,  198,  739,  1222,   1395, ...
  252,  131, 2080, 1629, -3772, -14873, ...
		

Crossrefs

Columns k=0..4 give A000984, A337393, A337421, A337422, A337396.
Main diagonal gives A337420.

Programs

  • Mathematica
    T[n_, k_] := Sum[If[k == 0, Boole[n == j], (-k)^(n - j)] * Binomial[2*j, j] * Binomial[2*n, 2*j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Aug 27 2020 *)
  • PARI
    {T(n, k) = sum(j=0, n, (-k)^(n-j)*binomial(2*j, j)*binomial(2*n, 2*j))}

Formula

T(n,k) = Sum_{j=0..n} (-k)^(n-j) * binomial(2*j,j) * binomial(2*n,2*j).
T(0,k) = 1, T(1,k) = 2-k and n * (2*n-1) * (4*n-5) * T(n,k) = (4*n-3) * (-4*(k-4)*n^2+6*(k-4)*n-k+6) * T(n-1,k) - (k+4)^2 * (n-1) * (2*n-3) * (4*n-1) * T(n-2,k) for n > 1. - Seiichi Manyama, Aug 28 2020

A333988 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of (1-(k+1)*x) / (1-2*(k+1)*x+((k-1)*x)^2).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 8, 1, 1, 4, 17, 32, 1, 1, 5, 28, 99, 128, 1, 1, 6, 41, 208, 577, 512, 1, 1, 7, 56, 365, 1552, 3363, 2048, 1, 1, 8, 73, 576, 3281, 11584, 19601, 8192, 1, 1, 9, 92, 847, 6016, 29525, 86464, 114243, 32768, 1, 1, 10, 113, 1184, 10033, 62976, 265721, 645376, 665857, 131072, 1
Offset: 0

Views

Author

Seiichi Manyama, Sep 04 2020

Keywords

Examples

			Square array begins:
  1,   1,    1,     1,     1,     1, ...
  1,   2,    3,     4,     5,     6, ...
  1,   8,   17,    28,    41,    56, ...
  1,  32,   99,   208,   365,   576, ...
  1, 128,  577,  1552,  3281,  6016, ...
  1, 512, 3363, 11584, 29525, 62976, ...
		

Crossrefs

Main diagonal gives A333990.

Programs

  • Mathematica
    T[n_, 0] := 1; T[n_, k_] := Sum[k^j * Binomial[2*n, 2*j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Sep 04 2020 *)
  • PARI
    {T(n, k) = sum(j=0, n, k^j*binomial(2*n, 2*j))}

Formula

T(n,k) = Sum_{j=0..n} k^j * binomial(2*n,2*j).
T(0,k) = 1, T(1,k) = k+1 and T(n,k) = 2 * (k+1) * T(n-1,k) - (k-1)^2 * T(n-2,k) for n>1.

A337369 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of sqrt(2 / ( (1-2*(k+4)*x+((k-4)*x)^2) * (1+(k-4)*x+sqrt(1-2*(k+4)*x+((k-4)*x)^2)) )).

Original entry on oeis.org

1, 1, 6, 1, 7, 30, 1, 8, 51, 140, 1, 9, 74, 393, 630, 1, 10, 99, 736, 3139, 2772, 1, 11, 126, 1175, 7606, 25653, 12012, 1, 12, 155, 1716, 14499, 80464, 212941, 51480, 1, 13, 186, 2365, 24310, 183195, 864772, 1787607, 218790, 1, 14, 219, 3128, 37555, 352716, 2351805, 9400192, 15134931, 923780
Offset: 0

Views

Author

Seiichi Manyama, Aug 25 2020

Keywords

Examples

			Square array begins:
     1,     1,     1,      1,      1,      1, ...
     6,     7,     8,      9,     10,     11, ...
    30,    51,    74,     99,    126,    155, ...
   140,   393,   736,   1175,   1716,   2365, ...
   630,  3139,  7606,  14499,  24310,  37555, ...
  2772, 25653, 80464, 183195, 352716, 610897, ...
		

Crossrefs

Columns k=0..5 give A002457, A273055, A337370, A245927, A002458, A243947.
Main diagonal gives A337387.

Programs

  • Mathematica
    T[n_, k_] := Sum[If[k == 0, Boole[n == j], k^(n - j)] * Binomial[2*j, j] * Binomial[2*n + 1, 2*j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Aug 25 2020 *)
  • PARI
    {T(n, k) = sum(j=0, n, k^(n-j)*binomial(2*j, j)*binomial(2*n+1, 2*j))}

Formula

T(n,k) = Sum_{j=0..n} k^(n-j) * binomial(2*j,j) * binomial(2*n+1,2*j).
T(0,k) = 1, T(1,k) = k+6 and n * (2*n+1) * (4*n-3) * T(n,k) = (4*n-1) * (4*(k+4)*n^2-2*(k+4)*n-k-2) * T(n-1,k) - (k-4)^2 * (n-1) * (2*n-1) * (4*n+1) * T(n-2,k) for n > 1. - Seiichi Manyama, Aug 29 2020
For fixed k > 0, T(n,k) ~ (2 + sqrt(k))^(2*n + 3/2) / sqrt(8*k*Pi*n). - Vaclav Kotesovec, Aug 31 2020

A337390 Expansion of sqrt((1-2*x+sqrt(1-12*x+4*x^2)) / (2 * (1-12*x+4*x^2))).

Original entry on oeis.org

1, 4, 34, 328, 3334, 34904, 372436, 4027216, 43976774, 483860632, 5355697084, 59569288816, 665238165916, 7454247891952, 83769667651816, 943744775565728, 10655369806377542, 120535523282756632, 1365840013196530348, 15500428304345011504, 176148760580561346484
Offset: 0

Views

Author

Seiichi Manyama, Aug 25 2020

Keywords

Crossrefs

Column k=2 of A337389.

Programs

  • Mathematica
    a[n_] := Sum[2^(n - k) * Binomial[2*k, k] * Binomial[2*n, 2*k], {k, 0, n}]; Array[a, 21, 0] (* Amiram Eldar, Aug 25 2020 *)
  • PARI
    N=40; x='x+O('x^N); Vec(sqrt((1-2*x+sqrt(1-12*x+4*x^2))/(2*(1-12*x+4*x^2))))
    
  • PARI
    {a(n) = sum(k=0, n, 2^(n-k)*binomial(2*k, k)*binomial(2*n, 2*k))}

Formula

a(n) = Sum_{k=0..n} 2^(n-k) * binomial(2*k,k) * binomial(2*n,2*k).
a(0) = 1, a(1) = 4 and n * (2*n-1) * (4*n-5) * a(n) = (4*n-3) * (24*n^2-36*n+8) * a(n-1) - 4 * (n-1) * (2*n-3) * (4*n-1) * a(n-2) for n > 1. - Seiichi Manyama, Aug 28 2020
a(n) ~ 2^(n - 5/4) * (1 + sqrt(2))^(2*n + 1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Aug 31 2020
From Peter Bala, May 02 2022: (Start)
Conjecture: a(n) = [x^n] ( (1 + x^2)*(1 + x)^2/(1 - x)^2 )^n. Equivalently, a(n) = Sum_{k = 0..n} Sum_{j = 0..n-2*k} binomial(n,k)*binomial(2*n,j)*binomial(3*n-2*k-j-1,n-2*k-j).
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. Calculation suggests that the supercongruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for primes p >= 3 and positive integers n and k.
It appears that a(n)^2 = Sum_{k = 0..2*n} (-1)^k*2^(2*n-k)*binomial(2*k,k)^2* binomial(2*n+k,2*k). Compare with the pair of identities: binomial(2*n,n) = Sum_{k = 0..n} 2^(n-2*k)*binomial(2*k,k)*binomial(n,2*k) and binomial(2*n,n)^2 = Sum_{k = 0..2*n} (-1)^k*2^(4*n-2*k)*binomial(2*k,k)^2*binomial(2*n+k,2*k). (End)

A337388 a(n) = Sum_{k=0..n} n^(n-k) * binomial(2*k,k) * binomial(2*n,2*k).

Original entry on oeis.org

1, 3, 34, 587, 12870, 337877, 10262004, 352436961, 13465074758, 565280386625, 25826066397756, 1274138666796217, 67446164001827356, 3810171540686207283, 228658931521878071080, 14520123059677034441895, 972281769469377542763078, 68443768336740463562683177
Offset: 0

Views

Author

Seiichi Manyama, Aug 25 2020

Keywords

Crossrefs

Main diagonal of A337389.
Cf. A337387.

Programs

  • Mathematica
    a[n_] := Sum[If[n == 0, Boole[n == k], n^(n - k)] * Binomial[2*k, k] * Binomial[2*n, 2*k], {k, 0, n}]; Array[a, 18, 0] (* Amiram Eldar, Aug 25 2020 *)
  • PARI
    {a(n) = sum(k=0, n, n^(n-k)*binomial(2*k, k)*binomial(2*n, 2*k))}

Formula

From Vaclav Kotesovec, Aug 31 2020: (Start)
a(n) ~ (2 + sqrt(n))^(2*n + 1/2) / sqrt(8*Pi*n).
a(n) ~ exp(4*sqrt(n) - 4) * n^(n - 1/4) / sqrt(8*Pi) * (1 + 19/(3*sqrt(n)) + 199/(18*n)). (End)
Showing 1-7 of 7 results.