A111808 Left half of trinomial triangle (A027907), triangle read by rows.
1, 1, 1, 1, 2, 3, 1, 3, 6, 7, 1, 4, 10, 16, 19, 1, 5, 15, 30, 45, 51, 1, 6, 21, 50, 90, 126, 141, 1, 7, 28, 77, 161, 266, 357, 393, 1, 8, 36, 112, 266, 504, 784, 1016, 1107, 1, 9, 45, 156, 414, 882, 1554, 2304, 2907, 3139, 1, 10, 55, 210, 615, 1452, 2850, 4740, 6765, 8350
Offset: 1
References
- Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.
Links
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
- Eric Weisstein's World of Mathematics, Trinomial Triangle
- Eric Weisstein's World of Mathematics, Trinomial Coefficient
Crossrefs
T(n, 0) = 0;
T(n, 1) = n for n>1;
T(n, 2) = A000217(n) for n>1;
T(n, 3) = A005581(n) for n>2;
T(n, 4) = A005712(n) for n>3;
T(n, 5) = A000574(n) for n>4;
T(n, 6) = A005714(n) for n>5;
T(n, 7) = A005715(n) for n>6;
T(n, 8) = A005716(n) for n>7;
T(n, 9) = A064054(n-5) for n>8;
T(n, n-5) = A098470(n) for n>4;
T(n, n-4) = A014533(n-3) for n>3;
T(n, n-3) = A014532(n-2) for n>2;
T(n, n-2) = A014531(n-1) for n>1;
T(n, n-1) = A005717(n) for n>0;
Programs
-
Maple
T := (n,k) -> simplify(GegenbauerC(k, -n, -1/2)): for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, May 09 2016
-
Mathematica
Table[GegenbauerC[k, -n, -1/2], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Feb 28 2017 *)
Formula
(1 + x + x^2)^n = Sum(T(n,k)*x^k: 0<=k<=n) + Sum(T(n,k)*x^(2*n-k): 0<=k
T(n, k) = A027907(n, k) = Sum_{i=0,..,(k/2)} binomial(n, n-k+2*i) * binomial(n-k+2*i, i), 0<=k<=n.
T(n, k) = GegenbauerC(k, -n, -1/2). - Peter Luschny, May 09 2016
Extensions
Corrected and edited by Johannes W. Meijer, Oct 05 2010
A025177 Triangular array, read by rows: first differences in n,n direction of trinomial array A027907.
1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 2, 4, 4, 4, 2, 1, 1, 3, 7, 10, 12, 10, 7, 3, 1, 1, 4, 11, 20, 29, 32, 29, 20, 11, 4, 1, 1, 5, 16, 35, 60, 81, 90, 81, 60, 35, 16, 5, 1, 1, 6, 22, 56, 111, 176, 231, 252, 231, 176, 111, 56, 22, 6, 1, 1, 7, 29, 84, 189, 343, 518, 659, 714, 659, 518, 343
Offset: 0
Comments
The Motzkin transforms of the rows starting (1, 2), (1, 3) and (1, 4), extended by zeros after their last element, are apparently in A026134, A026109 and A026110. - R. J. Mathar, Dec 11 2008
Examples
1 1 0 1 1 1 2 1 1 1 2 4 4 4 2 1 1 3 7 10 12 10 7 3 1 1 4 11 20 29 32 29 20 11 4 1
Links
- Georg Fischer, Table of n, a(n) for n = 0..2499 [rows 0..49; first 676 terms from _G. C. Greubel_]
Crossrefs
Programs
-
Maple
A025177 := proc(n,k) option remember; if k < 0 or k > 2*n then 0; elif n = 0 then 1 ; elif n = 1 then op(k+1,[1,0,1]) ; else procname(n-1,k-2)+procname(n-1,k-1)+procname(n-1,k) ; end if; end proc: seq(seq(A025177(n,k),k=0..2*n),n=0..20) ; # R. J. Mathar, Feb 25 2015
-
Mathematica
nmax = 10; CoefficientList[CoefficientList[Series[(1 - y*x)/(1 - x*(1 + y + y^2)), {x, 0, nmax}, {y, 0, 2*nmax}], x], y] // Flatten (* G. C. Greubel, May 22 2017; amended by Georg Fischer, Jun 24 2020 *)
-
PARI
{T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, if( n==1, [1,0,1][k+1], if( n==2, [1,1,2,1,1][k+1], T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)))))};
-
PARI
T(n,k)=polcoeff(Ser(polcoeff(Ser((1-y*z)/(1-z*(1+y+y^2)),y),k,y),z),n,z)
-
PARI
{T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, polcoeff( (1 + x + x^2)^n, k) - polcoeff( (1 + x + x^2)^(n-1), k-1)))};
-
PARI
g=matrix(33,65); for(n=0,32,for(k=0,2*n,g[n+1,k+1]=0)); g[1,1]=1; g[2,1]=1;g[2,2]=0;g[2,3]=1; g[3,1]=1;g[3,2]=1;g[3,3]=2;g[3,4]=1;g[3,5]=1; for(n=0,2,for(k=0,2*n,print(n," ",k," ",g[n+1,k+1]))) for(n=3,32,g[n+1,1]=1;print(n," 1 1");g[n+1,2]=n-1;print(n," 2 ",n-1);for(k=2,2*n,g[n+1,k+1]=g[n,k-1]+g[n,k]+g[n,k+1];print(n," ",k," ",g[n+1,k+1]))) \\ Michael B. Porter, Feb 02 2010
Formula
T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 0, 1].
G.f.: (1-y*z)/[1-z*(1+y+y^2)].
Extensions
Edited by Ralf Stephan, Jan 09 2005
Offset corrected by R. J. Mathar, Feb 25 2015
A024996 Triangular array, read by rows: second differences in n,n direction of trinomial array A027907.
1, 1, 0, 1, 1, 0, 2, 0, 1, 1, 1, 3, 2, 3, 1, 1, 1, 2, 5, 6, 8, 6, 5, 2, 1, 1, 3, 8, 13, 19, 20, 19, 13, 8, 3, 1, 1, 4, 12, 24, 40, 52, 58, 52, 40, 24, 12, 4, 1, 1, 5, 17, 40, 76, 116, 150, 162, 150, 116, 76, 40, 17, 5, 1, 1, 6, 23, 62, 133, 232, 342, 428, 462, 428, 342, 232, 133, 62, 23, 6
Offset: 0
Comments
For n > 2, T(n,k) is the number of integer strings s(0), ..., s(n) such that s(n) = n - k, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2 and <= 1 for i >= 3.
Examples
1 1 0 1 1 0 2 0 1 1 1 3 2 3 1 1 1 2 5 6 8 6 5 2 1 1 3 8 13 19 20 19 13 8 3 1
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1874 [a(676) ff. corrected by _Georg Fischer_, Jun 24 2020]
Crossrefs
Programs
-
Julia
using Nemo function A024996Expansion(prec) R, t = PolynomialRing(ZZ, "t") S, x = PowerSeriesRing(R, prec+1, "x") ser = divexact(x^2*t^3 + x^2*t + x*t - 1, x*t^2 + x*t + x - 1) L = zeros(ZZ, prec^2) for k ∈ 0:prec-1, n ∈ 0:2*k L[k^2+n+1] = coeff(coeff(ser, k), n) end L end A024996Expansion(8) |> println # Peter Luschny, Jun 25 2020
-
Maple
A024996 := proc(n,k) option remember; if n < 0 or k < 0 or k > 2*n then 0 ; elif n <= 2 then if k = 2*n or k = 0 then 1; elif k = 2*n-1 or k = 1 then 0; elif k =2 then 2; end if; else procname(n-1,k-1)+procname(n-1,k-2)+procname(n-1,k) ; end if; end proc: # R. J. Mathar, Jun 23 2013 seq(seq(A024996(n,k), k=0..2*n), n=0..11); # added by Georg Fischer, Jun 24 2020
-
Mathematica
nmax = 10; CoefficientList[CoefficientList[Series[y*x + (1 - y*x)^2/(1 - x*(1 + y + y^2)), {x, 0, nmax}, {y, 0, 2*nmax}], x], y] // Flatten (* G. C. Greubel, May 22 2017; amended by Georg Fischer, Jun 24 2020 *)
-
PARI
T(n,k)=if(n<0||k<0||k>2*n,0,if(n==0,1,if(n==1,[1,0,1][k+1],if(n==2,[1,0,2,0,1][k+1],T(n-1,k-2)+T(n-1,k-1)+T(n-1,k))))) \\ Ralf Stephan, Jan 09 2004 nmax=8; for(n=0, nmax, for(k=0, 2*n, print1(T(n,k),","))) \\ added by _Georg Fischer, Jun 24 2020
Formula
T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 0, 1], [1, 0, 2, 0, 1].
G.f.: y*z + (1-y*z)^2 / (1-z*(1+y+y^2)). - Ralf Stephan, Jan 09 2005 [corrected by Peter Luschny, Jun 25 2020]
Extensions
Edited by Ralf Stephan, Jan 09 2004
Offset corrected by R. J. Mathar, Jun 23 2013
A027914 T(n,0) + T(n,1) + ... + T(n,n), T given by A027907.
1, 2, 6, 17, 50, 147, 435, 1290, 3834, 11411, 34001, 101400, 302615, 903632, 2699598, 8068257, 24121674, 72137547, 215786649, 645629160, 1932081885, 5782851966, 17311097568, 51828203475, 155188936431, 464732722872
Offset: 0
Comments
Let b(n)=a(n) mod 2; then b(n)=1/2+(-1)^n*(1/2-A010060(floor(n/2))). - Benoit Cloitre, Mar 23 2004
Binomial transform of A027306. Inverse binomial transform of = A032443. Hankel transform is {1, 2, 3, 4, ..., n, ...}. - Philippe Deléham, Jul 20 2005
Sums of rows of the triangle in A111808. - Reinhard Zumkeller, Aug 17 2005
Number of 3-ary words of length n in which the number of 1's does not exceed the number of 0's. - David Scambler, Aug 14 2012
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 07 2022
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Moa Apagodu and Ji-Cai Liu, Congruence properties for the trinomial coefficients, arXiv:1907.13547 [math.NT], 2019.
- Yassine Otmani, The 2-Pascal Triangle and a Related Riordan Array, J. Int. Seq. (2025) Vol. 28, Issue 3, Art. No. 25.3.5. See p. 24.
Programs
-
Haskell
a027914 n = sum $ take (n + 1) $ a027907_row n -- Reinhard Zumkeller, Jan 22 2013
-
Maple
a := n -> simplify((3^n + GegenbauerC(n,-n,-1/2))/2): seq(a(n), n=0..25); # Peter Luschny, May 12 2016
-
Mathematica
CoefficientList[ Series[ (1 + x + Sqrt[1 - 2x - 3x^2])/(2 - 4x - 6x^2), {x, 0, 26}], x] (* Robert G. Wilson v, Jul 21 2015 *) Table[(3^n + Hypergeometric2F1[1/2 - n/2, -n/2, 1, 4])/2, {n, 0, 20}] (* Vladimir Reshetnikov, May 07 2016 *) f[n_] := Plus @@ Take[ CoefficientList[ Sum[x^k, {k, 0, 2}]^n, x], n +1]; Array[f, 26, 0] (* Robert G. Wilson v, Jan 30 2017 *)
-
PARI
a(n)=sum(i=0,n,polcoeff((1+x+x^2)^n,i,x))
-
PARI
a(n)=sum(i=0,n,sum(j=0,n,sum(k=0,j,if(i+j+k-n,0,(n!/i!/j!/k!)))))
-
PARI
x='x+O('x^99); Vec((1+x+(1-2*x-3*x^2)^(1/2))/(2*(1-2*x-3*x^2))) \\ Altug Alkan, May 12 2016
Formula
a(n) = ( 3^n + A002426(n) )/2; lim n -> infinity a(n+1)/a(n) = 3; 3^n < 2*a(n) < 3^(n+1). - Benoit Cloitre, Sep 28 2002
From Benoit Cloitre, Jan 26 2003: (Start)
a(n) = (1/2) *( Sum{k = 0..n} binomial(n,k)*binomial(n-k,k) + 3^n );
a(n) = Sum_{k = 0..n} Sum_{i = 0..k} binomial(n,i)*binomial(n-i,k);
a(n) = 3^n/2*(1+c/sqrt(n)+O(n^-1/2)) where c=0.5... (End)
c = sqrt(3/Pi)/2 = 0.4886025119... - Vaclav Kotesovec, May 07 2016
a(n) = n!*Sum(i+j+k=n, 1/(i!*j!*k!)) 0<=i<=n, 0<=k<=j<=n. - Benoit Cloitre, Mar 23 2004
G.f.: (1+x+sqrt(1-2x-3x^2))/(2(1-2x-3x^2)); a(n) = Sum_{k = 0..n} floor((k+2)/2)*Sum_{i = 0..floor((n-k)/2)} C(n,i)*C(n-i,i+k)* ((k+1)/(i+k+1)). - Paul Barry, Sep 23 2005; corrected Jan 20 2008
D-finite with recurrence: n*a(n) +(-5*n+4)*a(n-1) +3*(n-2)*a(n-2) +9*(n-2)*a(n-3)=0. - R. J. Mathar, Dec 02 2012
G.f.: (1+x+1/G(0))/(2*(1-2*x-3*x^2)), 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, Jul 30 2013
From Peter Bala, Jul 21 2015: (Start)
a(n) = [x^n]( 3*x - 1/(1 - x) )^n.
1 + x*exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 35*x^5 + ... is the o.g.f. for A005773. (End)
a(n) = (3^n + GegenbauerC(n,-n,-1/2))/2. - Peter Luschny, May 12 2016
A025564 Triangular array, read by rows: pairwise sums of trinomial array A027907.
1, 1, 2, 1, 1, 3, 4, 3, 1, 1, 4, 8, 10, 8, 4, 1, 1, 5, 13, 22, 26, 22, 13, 5, 1, 1, 6, 19, 40, 61, 70, 61, 40, 19, 6, 1, 1, 7, 26, 65, 120, 171, 192, 171, 120, 65, 26, 7, 1, 1, 8, 34, 98, 211, 356, 483, 534, 483, 356, 211, 98, 34, 8, 1, 1, 9, 43, 140, 343, 665, 1050, 1373
Offset: 0
Comments
Counting the top row as row 0, T(n,k) is the number of strings of nonnegative integers "s(1)s(2)s(3)...s(k)" such that s(1)+s(2)+s(3)+...+s(k) = n and the string does not contain the substring "00". E.g., T(3,5) = 8 because the valid strings are 02010, 01020, 11010, 10110, 10101, 01110, 01101 and 01011. T(4,3) = 13, counting 040, 311, 301, 130, 031, 103, 013, 220, 202, 022, 211, 121 and 112. - Jose Luis Arregui (arregui(AT)unizar.es), Dec 05 2007
Examples
1 1 2 1 1 3 4 3 1 1 4 8 10 8 4 1 1 5 13 22 26 22 13 5 1
Programs
-
Mathematica
T[, 0] = 1; T[1, 1] = 2; T[n, k_] /; 0 <= k <= 2n := T[n, k] = T[n-1, k-2] + T[n-1, k-1] + T[n-1, k]; T[, ] = 0; Table[T[n, k], {n, 0, 10}, {k, 0, 2n}] // Flatten (* Jean-François Alcover, Jul 22 2018 *)
-
PARI
{T(n, k) = if( k<0 || k>2*n, 0, if( n==0, 1, if( n==1, [1,2,1][k+1], if( n==2, [1,3,4,3,1][k+1], T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)))))};
-
PARI
T(n,k)=polcoeff(Ser(polcoeff(Ser((1+y*z)/(1-z*(1+y+y^2)),y),k,y),z),n,z)
-
PARI
{T(n, k) = if( k<0 || k>2*n, 0, if(n==0, 1, polcoeff( (1 + x + x^2)^n, k)+ polcoeff( (1 + x + x^2)^(n-1), k-1)))};
Formula
T(n, k) = T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), starting with [1], [1, 2, 1], [1, 3, 4, 3, 1].
G.f.: (1+yz)/[1-z(1+y+y^2)].
Extensions
Edited by Ralf Stephan, Jan 09 2005
Edited by Clark Kimberling, Jun 20 2012
A082758 Sum of the squares of the trinomial coefficients (A027907).
1, 3, 19, 141, 1107, 8953, 73789, 616227, 5196627, 44152809, 377379369, 3241135527, 27948336381, 241813226151, 2098240353907, 18252025766941, 159114492071763, 1389754816243449, 12159131877715993, 106542797484006471, 934837217271732457, 8212609533895771131
Offset: 0
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.)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Jelena Đokić, Olga Bodroža-Pantić, and Ksenija Doroslovački, A spanning union of cycles in rectangular grid graphs, thick grid cylinders and Moebius strips, Transactions on Combinatorics (2023) Art. 27132.
- Veronika Irvine, Lace Tessellations: A mathematical model for bobbin lace and an exhaustive combinatorial search for patterns, PhD Dissertation, University of Victoria, 2016.
- Veronika Irvine, Stephen Melczer, and Frank Ruskey, Vertically constrained Motzkin-like paths inspired by bobbin lace, arXiv:1804.08725 [math.CO], 2018.
- StackExchange, The asymptotic behavior of an integral, 2015.
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)
A027908 a(n) = T(2*n, n), T given by A027907.
1, 2, 10, 50, 266, 1452, 8074, 45474, 258570, 1481108, 8533660, 49402850, 287134346, 1674425300, 9792273690, 57407789550, 337281021450, 1985342102964, 11706001102180, 69124774458092, 408737856117916, 2419833655003752, 14341910428953018, 85087759173024870
Offset: 0
Keywords
Comments
Central terms of the triangle in A111808. - Reinhard Zumkeller, Aug 17 2005
Number of paths of semilength n starting at (0,0) and ending on the X-axis using steps (1,1), (1,-1) and (1,3). - David Scambler, Jun 21 2013
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..1000
Programs
-
Maple
ogf := series( RootOf( (144*x^2+140*x-27)*g^4+(18-12*x)*g^2+8*g+1, g), x=0, 20); # Mark van Hoeij, Nov 16 2011 a := n -> simplify(GegenbauerC(n, -2*n, -1/2)): seq(a(n), n=0..23); # Peter Luschny, May 09 2016
-
Mathematica
Table[Binomial[4 n, n] Hypergeometric2F1[-3 n, -n, 1/2 - 2 n, 1/4], {n, 0, 20}] (* or *) Table[GegenbauerC[3 n, -2 n, -1/2] + KroneckerDelta[n], {n, 0, 20}] (* Vladimir Reshetnikov, May 07 2016 *)
-
Maxima
makelist(ultraspherical(n,-2*n,-1/2),n,0,12); /* Emanuele Munarini, Oct 18 2016 */
Formula
G.f.: -(g^2+g+1)/(3*g^2+g-1) where g = x times the g.f. of A143927. - Mark van Hoeij, Nov 16 2011
a(n) = GegenbauerC(n, -2*n, -1/2). - Peter Luschny, May 09 2016
From Peter Bala, Jan 26 2020: (Start)
a(n) = [x^(2*n)](1 + x^2 + x^4)^(2*n).
a(n) = Sum_{k = 0..floor(n/2)} C(2*n, n-k)*C(n-k, k).
a(n) = C(2*n,n) * hypergeom([-n/2, (1 - n)/2], [n + 1], 4)
Conjectural: a(n*p^k) == a(n*p^(k-1)) ( mod p^(2*k) ) for all primes p >= 5 and positive integers n and k. (End)
From Peter Bala, Aug 03 2023: (Start)
P-recursive: 3*n*(13*n - 17)*(3*n - 1)*(3*n - 2)*a(n) = 2*(2*n - 1)*(455*n^3 - 1050*n^2 + 691*n - 120)*a(n-1) + 36*(n - 1)*(13*n - 4)*(2*n - 1)*(2*n - 3)*a(n-2) with a(0) = 1 and a(1) = 2.
exp(Sum_{n >= 0} a(n)*x^n/n) = 1 + 2*x + 7*x^2 + 28*x^3 + 123*x^4 + ... is the g.f. of A143927.
a(n) = 2*A344396(n-1) for n >= 1. (End)
A094531 Array read by rows: right-hand side of triangle A027907 of trinomial coefficients.
1, 1, 1, 3, 2, 1, 7, 6, 3, 1, 19, 16, 10, 4, 1, 51, 45, 30, 15, 5, 1, 141, 126, 90, 50, 21, 6, 1, 393, 357, 266, 161, 77, 28, 7, 1, 1107, 1016, 784, 504, 266, 112, 36, 8, 1, 3139, 2907, 2304, 1554, 882, 414, 156, 45, 9, 1, 8953, 8350, 6765, 4740, 2850, 1452, 615, 210, 55
Offset: 0
Comments
Sometimes called a Motzkin triangle, although that name is usually reserved for A026300.
Expand (1+x+x^2)^n and take last (nonzero) coefficient of first row, last two coefficients of second row, etc.
Coefficients of Faber polynomials for (1/x+1+x): Fa(n,x) = Sum_{k=0..n} T(n,k)*x^k, g.f.: -log((sqrt(-3*t^2-2*t+1)-t+1)/2-t*x) = Sum_{n>0} Fa(n,x)*t^n/n. - Vladimir Kruchinin, Jul 01 2013
Examples
Triangle begins: 1; 1, 1; 3, 2, 1; 7, 6, 3, 1; 19, 16, 10, 4, 1; 51, 45, 30, 15, 5, 1; 141, 126, 90, 50, 21, 6, 1; 393, 357, 266, 161, 77, 28, 7, 1; ...
Links
- Paul Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
- Tian-Xiao He and Renzo Sprugnoli, Sequence characterization of Riordan arrays, Discrete Math. (2009) Vol 309, No. 12, 3962-3974.
- Ana Luzón, Donatella Merlini, Manuel A. Morón, and Renzo Sprugnoli, Complementary Riordan arrays, Discrete Applied Mathematics, 172 (2014) 75-87.
- Asamoah Nkwanta and Earl R. Barnes, Two Catalan-type Riordan Arrays and their Connections to the Chebyshev Polynomials of the First Kind, Journal of Integer Sequences, Article 12.3.3, 2012.
- Yassine Otmani, The 2-Pascal Triangle and a Related Riordan Array, J. Int. Seq. (2025) Vol. 28, Issue 3, Art. No. 25.3.5. See p. 23.
- Paul Peart and Wen-jin Woan, A divisibility property for a subgroup of Riordan matrices, Discrete Applied Mathematics, Vol. 98, Issue 3, Jan 2000, 255-263.
- Louis W. Shapiro, Seyoum Getu, Wen-Jin Woan, and Leon C. Woodson, The Riordan Group, Discrete Appl. Maths. 34 (1991) 229-239.
- Sheng-Liang Yang, Yan-Ni Dong, and Tian-Xiao He, Some matrix identities on colored Motzkin paths, Discrete Mathematics 340.12 (2017): 3081-3091.
Programs
-
Maple
T := (n, k) -> simplify(GegenbauerC(n-k, -n, -1/2)): for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, May 12 2016
-
Mathematica
max = 10; se = Series[ -Log[ (Sqrt[-3*t^2 - 2*t + 1] - t + 1)/2 - t*x], {t, 0, max + 1}, {x, 0, max}]; a[n_, k_] := SeriesCoefficient[se, {t, 0, n}, {x, 0, k}]*n; a[0, 0] = 1; Table[a[n, k], {n, 0, max }, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 02 2013, after Vladimir Kruchinin *) Table[Binomial[n, k] Hypergeometric2F1[(k - n)/2, (k - n + 1)/2, k + 1, 4], {n, 0, 9}, {k, 0, n}] // Flatten (* or *) Table[If[n == 0, 1, GegenbauerC[n - k, -n, -1/2]], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, May 12 2016 *)
Formula
Riordan array ( 1/sqrt(1-2*x-3*x^2), (1-x-sqrt(1-2*x-3*x^2))/(2*x) ). - N. J. A. Sloane, Jun 02 2005
Product of Riordan arrays (1/(1-x), x/(1-x)) (Pascal's triangle, A007318) and (1/sqrt(1-4x^2), (1-sqrt(1-4*x^2))/(2*x)) (A108044). Inverse is A102587. - Paul Barry, Jul 14 2005
Column k has e.g.f. exp(x)*Bessel_I(k, 2x). - Paul Barry, Jul 14 2005
T(n, k) = Sum_{i=0..n} C(n-k-i, i)*C(n, k+i). - Paul Barry, Nov 04 2005
T(n, k) = Sum_{j=0..n} C(n,j)*C(j,n-k-j). - Paul Barry, Oct 25 2006
From Paul Barry, May 12 2009: (Start)
Production matrix is
1, 1;
2, 1, 1;
0, 1, 1, 1;
0, 0, 1, 1, 1;
0, 0, 0, 1, 1, 1; (End)
From Peter Bala, Jun 29 2015: (Start)
Riordan array has the form ( x*h'(x)/h(x), h(x) ) with h(x) = (1 - x -sqrt(1 - 2*x - 3*x^2))/(2*x) and so belongs to the hitting time subgroup H of the Riordan group (see Peart and Woan, Example 1.1).
T(n,k) = [x^(n-k)] f(x)^n with f(x) = 1 + x + x^2. In general the (n,k)th entry of the hitting time array ( x*h'(x)/h(x), h(x) ) has the form [x^(n-k)] f(x)^n, where f(x) = x/( series reversion of h(x) ). (End)
From Peter Luschny, May 12 2016: (Start)
T(n,k) = binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+1], 4):
T(n,k) = GegenbauerC(n-k, -n, -1/2). (End)
A168592 G.f.: exp( Sum_{n>=1} A082758(n)*x^n/n ), where A082758(n) = sum of the squares of the trinomial coefficients in row n of triangle A027907.
1, 3, 14, 80, 509, 3459, 24579, 180389, 1356743, 10402493, 81004516, 638886082, 5093081983, 40971735401, 332187974718, 2711668091448, 22267979870143, 183830653156341, 1524747465249750, 12700172705956876, 106187411693668179
Offset: 0
Keywords
Comments
Number of lattice paths from (0,0) to (n,n) which do not go above the diagonal x=y using steps (1,k), (k,1) with k >= 0 and two kinds of (1,1). - Alois P. Heinz, Oct 07 2015
Number of pairs of noncrossing paths of length n which start and end together, each taking steps (1,0), (1,1) or (1,-1) (i.e., Motzkin-type). - Nicholas R. Beaton, Jun 17 2024
Examples
G.f.: A(x) = 1 + 3*x + 14*x^2 + 80*x^3 + 509*x^4 + 3459*x^5 + ... log(A(x)) = 3*x + 19*x^2/2 + 141*x^3/3 + 1107*x^4/4 + 8953*x^5/5 + ... + A082758(n)*x^n/n + ...
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(x, y) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1, add(b(x-i, y-1), i=0..x) +add(b(x-1, y-j), j=0..y))) end: a:= n-> b(n$2): seq(a(n), n=0..25); # Alois P. Heinz, Oct 07 2015 # second Maple program: a:= proc(n) option remember; `if`(n<4, [1, 3, 14, 80][n+1], ((10*(n+1))*(16*n^3-20*n^2-n-1) *a(n-1) +(-944*n^4+2596*n^3-1924*n^2+236*n+30) *a(n-2) +(90*(n-2))*(16*n^3-52*n^2+45*n-6) *a(n-3) -(81*(2*n-5))*(n-2)*(n-3)*(4*n-1) *a(n-4))/ ((n+1)*(4*n-5)*(2*n+1)*(n+2))) end: seq(a(n), n=0..25); # Alois P. Heinz, Oct 07 2015
-
Mathematica
(1/x)*InverseSeries[x*(1 - x)^2/((1 + x)^2*(1 - x + x^2)) + O[x]^30, x] // CoefficientList[#, x]& (* Jean-François Alcover, Jun 09 2018 *)
-
PARI
{a(n)=if(n==0,1,polcoeff(exp(sum(m=1,n,sum(k=0,2*m, polcoeff((1+x+x^2)^m,k)^2)*x^m/m) +x*O(x^n)),n))}
-
PARI
{a(n)=polcoeff(1/x*serreverse(x*(1-x)^2/((1+x)^2*(1-x+x^2)+x*O(x^n))),n)}
Formula
G.f.: A(x) = (1/x)*Series_Reversion[x*(1-x)^2/((1+x)^2*(1-x+x^2))].
G.f.: A(x) satisfies A(x^2) = M(x)*M(-x), where M(x) is the g.f. of A001006. - Alexander Burstein, Oct 03 2017
G.f.: A(x) satisfies A(x^2) = (1-x - sqrt(1-2*x-3*x^2))*(1+x - sqrt(1+2*x-3*x^2))/(4*x^4). - Paul D. Hanna, Oct 05 2017, concluded from formula of Alexander Burstein.
A136590 Triangle of trinomial logarithmic coefficients: A027907(n,k) = Sum_{i=0..k} T(k,i)*n^i/k!.
1, 0, 1, 0, 1, 1, 0, -4, 3, 1, 0, 6, -13, 6, 1, 0, 24, -10, -25, 10, 1, 0, -240, 394, -135, -35, 15, 1, 0, 720, -2016, 1834, -525, -35, 21, 1, 0, 5040, -5076, -3668, 5089, -1400, -14, 28, 1, 0, -80640, 170064, -110692, 14364, 9849, -3024, 42, 36, 1, 0, 362880, -1155024, 1339020, -672400, 118125, 12873, -5670, 150, 45, 1
Offset: 0
Comments
A027907 is the triangle of trinomial coefficients.
The Bell transform of A136591(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 18 2016
Examples
Triangle begins: 1; 0, 1; 0, 1, 1; 0, -4, 3, 1; 0, 6, -13, 6, 1; 0, 24, -10, -25, 10, 1; 0, -240, 394, -135, -35, 15, 1; 0, 720, -2016, 1834, -525, -35, 21, 1; 0, 5040, -5076, -3668, 5089, -1400, -14, 28, 1; 0, -80640, 170064, -110692, 14364, 9849, -3024, 42, 36, 1; 0, 362880, -1155024, 1339020, -672400, 118125, 12873, -5670, 150, 45, 1; ... Trinomial coefficients can be calculated as illustrated by: A027907(4,3) = (T(3,0)*4^0 + T(3,1)*4^1 + T(3,2)*4^2 + T(3,3)*4^3)/3! = (0 - 4*4 + 3*4^2 + 1*4^3)/3! = 96/6 = 16.
Crossrefs
Programs
-
Maple
# The function BellMatrix is defined in A264428. BellMatrix(n -> n!*(modp(n+1,3)-modp(n,3)), 9); # Peter Luschny, Jan 27 2016
-
Mathematica
BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]]; rows = 11; M = BellMatrix[#!*(Mod[# + 1, 3] - Mod[#, 3])&, rows]; Table[M[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 23 2018, after Peter Luschny *)
-
PARI
{T(n,k)=n!/k!*polcoeff(log(1+x+x^2 +x*O(x^n))^k,n)} for(n=0,10, for(k=0,n, print1( T(n,k),", "));print(""))
-
Sage
# uses[bell_matrix from A264428] bell_matrix(lambda n: A136591(n+1), 10) # Peter Luschny, Jan 18 2016
Formula
E.g.f. of column k = log(1 + x + x^2)^k / k! for k>=0.
Central trinomial coefficients: A002426(n) = Sum_{k=0..n} T(n,k)*n^k/n!.
Comments