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

A104027 Triangle, read by rows, equal to the matrix inverse of A056241, which is formed from the even-indexed trinomial coefficients.

Original entry on oeis.org

1, -1, 1, 2, -3, 1, -7, 12, -6, 1, 41, -73, 41, -10, 1, -376, 675, -390, 105, -15, 1, 5033, -9048, 5256, -1446, 225, -21, 1, -92821, 166901, -97034, 26796, -4242, 427, -28, 1, 2257166, -4058703, 2359939, -652054, 103515, -10570, 742, -36, 1, -69981919, 125837748, -73169550, 20218251, -3210939
Offset: 0

Views

Author

Paul D. Hanna, Feb 26 2005

Keywords

Comments

Column 0 forms signed Hammersley's polynomial p_n(1) (A006846). Column 1 forms A104028.
Triangle T(n,k), 0<=k<=n, read by rows, given by [ -1, -1, -3, -4, -7, -9, -13, -16, -21, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is the operator defined in A084938; see A004652 : 0, 1, 1, 3, 4, 7, 9, 13, ... - Philippe Deléham, Sep 26 2005

Examples

			Rows begin:
1;
-1,1;
2,-3,1;
-7,12,-6,1;
41,-73,41,-10,1;
-376,675,-390,105,-15,1;
5033,-9048,5256,-1446,225,-21,1;
-92821,166901,-97034,26796,-4242,427,-28,1;
2257166,-4058703,2359939,-652054,103515,-10570,742,-36,1; ...
		

Crossrefs

Programs

  • PARI
    T(n,k)=if(n
    				

A104028 Column 1 of triangle A104027, which is the matrix inverse of the triangle A056241 of even-indexed trinomial coefficients.

Original entry on oeis.org

1, -3, 12, -73, 675, -9048, 166901, -4058703, 125837748, -4845013765, 226796981895, -12684595018992, 835391818484873, -63990023222817531, 5640684058036591260, -566948619030797914657, 64452061572236327204235, -8228252550026752605862344
Offset: 0

Views

Author

Paul D. Hanna, Feb 26 2005

Keywords

Comments

Column 0 of triangle A104027 forms signed Hammersley's polynomial p_n(1) (A006846).

Crossrefs

Programs

  • PARI
    {a(n)=if(n<0,0,((matrix(n+2,n+2,m,j, if(m>=j,polcoeff((1+x+x^2)^(m-1)+O(x^(2*j)),2*j-2))))^-1)[n+2,2])}

A124302 Number of set partitions with at most 3 blocks; number of Dyck paths of height at most 4; dimension of space of symmetric polynomials in 3 noncommuting variables.

Original entry on oeis.org

1, 1, 2, 5, 14, 41, 122, 365, 1094, 3281, 9842, 29525, 88574, 265721, 797162, 2391485, 7174454, 21523361, 64570082, 193710245, 581130734, 1743392201, 5230176602, 15690529805, 47071589414, 141214768241, 423644304722, 1270932914165, 3812798742494, 11438396227481
Offset: 0

Views

Author

Mike Zabrocki, Oct 25 2006

Keywords

Comments

Row sums of triangle in A056241. - Philippe Deléham, Oct 30 2006
Row sums of triangle in A147746. - Philippe Deléham, Dec 04 2008
Hankel transform is := [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Dec 04 2008
Number of nonisomorphic graded posets with 0 and 1 and uniform Hasse graph of rank n with no 3-element antichain. (Uniform used in the sense of Retakh, Serconek and Wilson. Graded used in Stanley's sense that every maximal chain has the same length n.) - David Nacin, Feb 26 2012
Number of Dyck paths of length 2n and height at most 4. - Ira M. Gessel, Aug 06 2012

Examples

			There are 15 set partitions of {1,2,3,4}, only {{1},{2},{3},{4}} has more than 3 blocks, so a(4) = 14.
G.f. = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 41*x^5 + 122*x^6 + 365*x^7 + ...
		

References

  • R. Stanley, Enumerative combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

Essentially the same as A007051.

Programs

  • Magma
    I:=[1, 1, 2]; [n le 3 select I[n] else  4*Self(n-1) - 3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Dec 25 2012
    
  • Maple
    a:= proc(n); if n<3 then [1,1,2][n+1]; else 4*a(n-1)-3*a(n-2); fi; end:
    # Mike Zabrocki, Oct 25 2006
    with(GraphTheory): G:=PathGraph(5): A:= AdjacencyMatrix(G): nmax:=27; for n from 0 to 2*nmax do B(n):=A^n; b(n):=B(n)[1,1]; od: for n from 0 to nmax do a(n):=b(2*n) od: seq(a(n),n=0..nmax);
    # Johannes W. Meijer, May 29 2010
  • Mathematica
    a=Exp[x]-1; Range[0, 20]! CoefficientList[Series[1+a+a^2/2+a^3/6, {x,0,20}],x]
    Join[{1}, LinearRecurrence[{4, -3}, {1, 2}, 20]] (* David Nacin, Feb 26 2012 *)
    CoefficientList[Series[1 / (1 - x / (1 - x / (1 - x / (1 - x)))), {x, 0, 30}], x] (* Vincenzo Librandi, Dec 25 2012 *)
    Table[Sum[StirlingS2[n,k],{k,0,3}],{n,0,30}] (* Robert A. Russell, Mar 29 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, (3^(n-1) + 1) / 2)}; /* Michael Somos, Apr 03 2014 */
  • Python
    def a(n, adict={0:1, 1:1, 2:2}):
        if n in adict:
            return adict[n]
        adict[n]=4*a(n-1) - 3*a(n-2)
        return adict[n] # David Nacin, Mar 04 2012
    

Formula

O.g.f.: (q^2 - 3*q + 1)/(3*q^2 - 4*q + 1) = Sum_{k=0..3} (q^k/Product_{i=1..k} (1-i*q)).
a(n) = 4*a(n-1) - 3*a(n-2); a(0) = 1, a(1) = 1, a(2) = 2, a(n) = Sum_{k=1..3} A008277(n,k).
Inverse binomial transform of A007581. - Philippe Deléham, Oct 30 2006
a(n) = Sum_{k=0..n} A056241(n,k), n >= 1. - Philippe Deléham, Oct 30 2006
a(0) = 1, a(n) = (3^(n-1) + 1)/2 for n >= 1, see A007051. - Philippe Deléham, Oct 30 2006
E.g.f.: (2 + 3*exp(x) + exp(3x))/6.
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 - x)))). - Michael Somos, May 03 2012
G.f.: 1 + x + 3*x^2*U(0)/2 where U(k) = 1 + 2/(3*3^k + 3*3^k/(1 - 18*x*3^k/ (9*x*3^k - 1/U(k+1)))); (continued fraction, 4-step). - Sergei N. Gladkovskii, Nov 01 2012
G.f.: 1+x*G(0) where G(k) = 1 + 2*x/( 1-2*x - x*(1-2*x)/(x + (1-2*x)*2/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 10 2012
a(n) = Sum_{k=0..3} Stirling2(n,k). - Robert A. Russell, Mar 29 2018
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=3. - Robert A. Russell, Apr 25 2018

A083878 a(0)=1, a(1)=3, a(n) = 6*a(n-1) - 7*a(n-2), n >= 2.

Original entry on oeis.org

1, 3, 11, 45, 193, 843, 3707, 16341, 72097, 318195, 1404491, 6199581, 27366049, 120799227, 533233019, 2353803525, 10390190017, 45864515427, 202455762443, 893682966669, 3944907462913, 17413664010795, 76867631824379
Offset: 0

Views

Author

Paul Barry, May 08 2003

Keywords

Comments

Binomial transform of A006012. Second binomial transform of A001333.
Third binomial transform of A077957. Inverse binomial transform of A083879. - Philippe Deléham, Dec 01 2008

Crossrefs

Programs

  • Mathematica
    f[n_] := Simplify[(3 + Sqrt@2)^n + (3 - Sqrt@2)^n]/2; Array[f, 23, 0] (* Robert G. Wilson v, Oct 31 2010 *)

Formula

a(n) = ((3 - sqrt(2))^n + (3 + sqrt(2))^n)/2;
a(n) = Sum_{k=0..n} C(n, 2k)*3^(n-2k)*2^k;
G.f.: (1-3x)/(1-6x+7x^2);
E.g.f.: exp(3x)*cosh(x*sqrt(2)).
a(n) = Sum_{k=0..n} C(n, k)*2^((n-k)/2)(1+(-1)^(n-k))*3^k/2. - Paul Barry, Jan 22 2005
a(n) = Sum_{k=0..n} A098158(n,k)*3^(2k-n)*2^(n-k). - Philippe Deléham, Dec 01 2008
a(n) = A081179(n+1) - 3*A081179(n). - R. J. Mathar, Nov 10 2013
a(n) = Sum_{k=1..n} A056241(n, k) * 2^(k-1). - J. Conrad, Nov 23 2022

A180957 Generalized Narayana triangle for (-1)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -2, -5, -2, 1, 1, -5, -15, -15, -5, 1, 1, -9, -30, -41, -30, -9, 1, 1, -14, -49, -77, -77, -49, -14, 1, 1, -20, -70, -112, -125, -112, -70, -20, 1, 1, -27, -90, -126, -117, -117, -126, -90, -27, 1, 1, -35, -105, -90, 45, 131, 45, -90, -105, -35, 1
Offset: 0

Views

Author

Paul Barry, Sep 28 2010

Keywords

Examples

			Triangle begins
  1;
  1,   1;
  1,   1,    1;
  1,   0,    0,    1;
  1,  -2,   -5,   -2,    1;
  1,  -5,  -15,  -15,   -5,    1;
  1,  -9,  -30,  -41,  -30,   -9,    1;
  1, -14,  -49,  -77,  -77,  -49,  -14,   1;
  1, -20,  -70, -112, -125, -112,  -70, -20,    1;
  1, -27,  -90, -126, -117, -117, -126, -90,  -27,   1;
  1, -35, -105,  -90,   45,  131,   45, -90, -105, -35, 1;
		

Crossrefs

Variant: A061176.

Programs

  • Magma
    A180957:= func< n,k | (&+[ (-1)^(k-j)*Binomial(n, j)*Binomial(n-j, 2*(k-j)) : j in [0..n]]) >;
    [A180957(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Apr 06 2021
    
  • Mathematica
    T[n_, k_]:= Sum[(-1)^(k-j)*Binomial[n, j]*Binomial[n-j, 2*(k-j)], {j,0,n}];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 06 2021 *)
  • Sage
    def A180957(n,k): return sum( (-1)^(k+j)*binomial(n,j)*binomial(n-j, 2*(k-j)) for j in (0..n))
    flatten([[A180957(n,k) for k in (0..n)] for n in [0..15]]) # G. C. Greubel, Apr 06 2021

Formula

G.f.: 1/(1 -x -x*y + x/(1 -x -x*y)) = (1 -x*(1+y))/(1 -2*x*(1+y) +x^2*(1 +3*y +y^2)).
E.g.f.: exp((1+y)*x) * cos(sqrt(y)*x).
T(n, k) = Sum_{j=0..n} (-1)^(k-j)*binomial(n,j)*binomial(n-j, 2*(k-j)).
Sum_{k=0..n} T(n, k) = A139011(n) (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = A180958(n) (diagonal sums).

A124216 Generalized Pascal triangle.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 9, 1, 1, 16, 34, 16, 1, 1, 25, 90, 90, 25, 1, 1, 36, 195, 328, 195, 36, 1, 1, 49, 371, 931, 931, 371, 49, 1, 1, 64, 644, 2240, 3334, 2240, 644, 64, 1, 1, 81, 1044, 4788, 9846, 9846
Offset: 0

Views

Author

Paul Barry, Oct 19 2006

Keywords

Comments

Consider the 1-parameter family of triangles with g.f. (1-x(1+y))/(1-2x(1+y)+x^2(1+k*x+y^2)). A007318 corresponds to k=2. A056241 corresponds to k=1. A124216 corresponds to k=0. Row sums are A006012. Diagonal sums are A124217.

Examples

			Triangle begins
1,
1, 1,
1, 4, 1,
1, 9, 9, 1,
1, 16, 34, 16, 1,
1, 25, 90, 90, 25, 1,
1, 36, 195, 328, 195, 36, 1,
1, 49, 371, 931, 931, 371, 49, 1
		

Crossrefs

Cf. A001263.

Formula

G.f.: (1-x(1+y))/(1-2x(1+y)+x^2(1+y^2)); Number triangle T(n,k)=sum{j=0..n, C(n,j)C(j,2(j-k))2^(j-k)}.
Equals 2*A001263 - A007318; (i.e. twice the Narayana triangle minus Pascal's triangle). - Gary W. Adamson, Jun 14 2007

A152265 a(n) = ((8 + sqrt(7))^n + (8 - sqrt(7))^n)/2.

Original entry on oeis.org

1, 8, 71, 680, 6833, 70568, 739607, 7811336, 82823777, 879934280, 9357993191, 99571637096, 1059740581649, 11280265991912, 120079042716599, 1278289521926600, 13608126915979457, 144867527905855112
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Dec 01 2008

Keywords

Comments

Binomial transform of A145302. Inverse binomial transform of A152266. - Philippe Deléham, Dec 03 2008

Crossrefs

Programs

  • Magma
    Z:= PolynomialRing(Integers()); N:=NumberField(x^2-7); S:=[ ((8+r7)^n+(8-r7)^n)/2: n in [0..17] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Dec 03 2008

Formula

From Philippe Deléham, Dec 03 2008: (Start)
a(n) = 16*a(n-1) - 57*a(n-2), n > 1; a(0)=1, a(1)=8.
G.f.: (1-8*x)/(1-16*x+57*x^2).
a(n) = Sum_{k=0..n} A098158(n,k)*8^(2k-n)*7^(n-k). (End)
a(n) = Sum_{k=1..n} A056241(n,k) * 7^(k-1). - J. Conrad, Nov 23 2022

Extensions

Extended beyond a(6) by Klaus Brockhaus, Dec 03 2008

A122935 Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, 0, 1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 1, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 6, 6, 1, 0, 1, 10, 19, 10, 1, 0, 1, 15, 45, 45, 15, 1, 0, 1, 21, 90, 141, 90, 21, 1, 0, 1, 28, 161, 357, 357, 161, 28, 1, 0, 1, 36, 266, 784, 1107, 784, 266, 36, 1, 0, 1, 45, 414, 1554, 2907, 2907, 1554, 414, 45, 1, 0, 1, 55, 615, 2850, 6765, 8953
Offset: 0

Views

Author

Philippe Deléham, Oct 30 2006

Keywords

Comments

Subtriangle (1 <= k <= n) is in A056241.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  3,   1;
  0, 1,  6,   6,    1;
  0, 1, 10,  19,   10,    1;
  0, 1, 15,  45,   45,   15,    1;
  0, 1, 21,  90,  141,   90,   21,    1;
  0, 1, 28, 161,  357,  357,  161,   28,    1;
  0, 1, 36, 266,  784, 1107,  784,  255,   36,   1;
  0, 1, 45, 414, 1554, 2907, 2907, 1554,  414,  45,  1;
  0, 1, 55, 615, 2850, 6765, 8953, 6765, 2850, 615, 55, 1;
		

Crossrefs

Formula

T(2*k-1,k) = A082758(k-1)for k >= 1.
Sum_{k=0..n} T(n,k) = A124302(n); see also A007051.
Sum_{k=0..n} (-1)^(n-k)*T(n,k) = A117569(n).
G.f.: (1-x*(y+2)+x^2)/(1-2x*(1+y)+(1+y+y^2)*x^2). - Philippe Deléham, Oct 30 2011

A123934 Triangle T(n,k), 1<=k<=n :forms the odd-indexed trinomial coefficients (A027907).

Original entry on oeis.org

1, 2, 2, 3, 7, 3, 4, 16, 16, 4, 5, 30, 51, 30, 5, 6, 50, 126, 126, 50, 6, 7, 77, 266, 393, 266, 77, 7
Offset: 1

Views

Author

Philippe Deléham, Oct 30 2006

Keywords

Examples

			Triangle begins:
1;
2, 2;
3, 7, 3;
4, 16, 16, 4;
5, 30, 51, 30, 5;
6, 50, 126, 126, 50, 6;
7, 77, 266, 393, 266, 77, 7;
		

Crossrefs

Cf. A056241.

Formula

Sum_{k, 1<=k<=n}T(n,k)=A003462(n)=(3^n-1)/2.
Showing 1-9 of 9 results.