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

A110522 Riordan array (1/(1+x), x*(1-2*x)/(1+x)^2).

Original entry on oeis.org

1, -1, 1, 1, -5, 1, -1, 12, -9, 1, 1, -22, 39, -13, 1, -1, 35, -115, 82, -17, 1, 1, -51, 270, -344, 141, -21, 1, -1, 70, -546, 1106, -773, 216, -25, 1, 1, -92, 994, -2954, 3199, -1466, 307, -29, 1, -1, 117, -1674, 6888, -10791, 7461, -2487, 414, -33, 1, 1, -145, 2655, -14484, 31179, -30645, 15060, -3900, 537, -37, 1
Offset: 0

Views

Author

Paul Barry, Jul 24 2005

Keywords

Comments

Inverse of A110519.
Product of inverse binomial transform matrix (1/(1+x), x/(1+x)) and (1, x*(1-3*x)) (A110517).

Examples

			Rows begin
   1;
  -1,    1;
   1,   -5,    1;
  -1,   12,   -9,    1;
   1,  -22,   39,  -13,    1;
  -1,   35, -115,   82,  -17,    1;
		

Crossrefs

Cf. A110519 (inverse), A110523 (row sums), A110524 (diagonal sums).

Programs

  • Magma
    A110522:= func< n,k | (-1)^(n+k)*(&+[ 3^(j-k)*Binomial(k,j-k)*Binomial(n,j) : j in [0..n]] ) >;
    [A110522(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 28 2023
    
  • Mathematica
    T[n_,k_]:= Sum[(-1)^(n-j)*(-3)^(j-k)*Binomial[k, j- k]*Binomial[n, j], {j,0,n}];
    Table[T[n,k], {n,0,20}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 30 2017 *)
  • PARI
    A110522(n,k) = if(n==0, 1, sum(j=0,n, (-1)^(n-j)*(-3)^(j-k)*binomial(n,j)*binomial(k, j-k)));
    for(n=0,12, for(k=0,n, print1(A110522(n,k), ", "))) \\ G. C. Greubel, Aug 30 2017; Dec 28 2023
    
  • SageMath
    def A110522(n,k): return (-1)^(n+k)*sum(3^(j-k)*binomial(k,j-k)*binomial(n,j) for j in range(n+1))
    flatten([[A110522(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 28 2023

Formula

Number triangle T(n, k) = Sum_{j=0..n} (-1)^(n-j)*C(n, j)*(-3)^(j-k)*C(k, j-k).
T(n, k) = Sum_{j=0..n} Sum_{i=0..k} C(k, i)*C(n+k-i-j-1, n-k-i-j)*(-1)^(n-k)*2^i.
Sum_{k=0..n} T(n, k) = A110523(n) (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = A110524(n) (diagonal sums).
T(n,k) = T(n-1,k-1) - 2*T(n-1,k) - T(n-2,k) - 2*T(n-2,k-1), T(0,0) = 1, T(1,0) = -1, T(1,1) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Jan 12 2014
From G. C. Greubel, Dec 28 2023: (Start)
T(n, 0) = A033999(n).
T(n, 1) = (-1)^(n-1)*A000326(n), n >= 1.
T(n, n) = 1.
T(n, n-1) = -A016813(n-1), n >= 1.
T(n, n-2) = A236267(n-2), n >= 2.
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^n*A052924(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^n*A078005(n). (End)

A077999 Expansion of (1-x)/(1-2*x-2*x^3).

Original entry on oeis.org

1, 1, 2, 6, 14, 32, 76, 180, 424, 1000, 2360, 5568, 13136, 30992, 73120, 172512, 407008, 960256, 2265536, 5345088, 12610688, 29752448, 70195072, 165611520, 390727936, 921846016, 2174915072, 5131286016, 12106264064, 28562358272, 67387288576, 158987105280
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n) = number of permutations on [n] that avoid nonconsecutive instances of the patterns 321 and 312. For example, a(4) does not count pi=4231 because 431 forms a 321 pattern in pi but 431 is not a consecutive (that is, contiguous) string in pi; also, the first 3 letters form a 312 pattern but that's not disqualifying because they do occur consecutively. Counting these permutations by various statistics yields the listed formulas/recurrences. - David Callan, Oct 26 2006
a(n) = term (1,1) of M^n, M = the 4 X 4 matrix [1,0,1,1; 1,1,0,0; 0,1,0,1; 1,0,0,1]. a(n)/a(n-1) tends to 2.3593040859..., an eigenvalue of the matrix and a root to the characteristic polynomial x^4 - 3x^3 + 2x^2 - 2x + 2. - Gary W. Adamson, Oct 01 2008

Crossrefs

Programs

  • GAP
    a:=[1,1,2];; for n in [4..40] do a[n]:=2*(a[n-1]+a[n-3]); od; a; # G. C. Greubel, Jun 27 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/( 1-2*x-2*x^3) )); // G. C. Greubel, Jun 27 2019
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2x-2x^3),{x,0,40}],x] (* or *) LinearRecurrence[{2,0,2},{1,1,2},40] (* Harvey P. Dale, Sep 10 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x)/(1-2*x-2*x^3)) \\ G. C. Greubel, Jun 27 2019
    
  • Sage
    ((1-x)/(1-2*x-2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
    

Formula

a(n) = 2*(a(n-1) + a(n-3)) counts the above permutations by first entry. a(n) = a(n-1) + a(n-2) + 3*Sum_{k=0..n-3} a(k) counts by last entry. a(n) = 2^(n-1) + Sum_{k=0..n-3} 2^(n-2-k)*a(k) counts by location of first 3xx pattern. a(n) = Sum_{k=0..floor(n/3)} ((n-k)/(n-2k))* binomial(n-2*k,k) * 2^(n-2*k-1) counts by number of 3xx patterns. - David Callan, Oct 26 2006
a(n) = A052912(n) - A052912(n-1). - R. J. Mathar, May 30 2014
a(n) = (-1)^n * A110524(n). - G. C. Greubel, Jun 27 2019
Showing 1-2 of 2 results.