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

A319203 Triangular Riordan matrix T = R^(-1) for triangular Riordan matrix R = (1/(1 - x^2 - x^3), x/(1 - x^2 - x^3)) = A104578.

Original entry on oeis.org

1, 0, 1, -1, 0, 1, -1, -2, 0, 1, 2, -2, -3, 0, 1, 5, 5, -3, -4, 0, 1, -2, 12, 9, -4, -5, 0, 1, -21, -7, 21, 14, -5, -6, 0, 1, -14, -56, -16, 32, 20, -6, -7, 0, 1, 72, -30, -108, -30, 45, 27, -7, -8, 0, 1, 138, 210, -45, -180, -50, 60, 35, -8, -9, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Oct 29 2018

Keywords

Comments

This is the lower triangular Riordan matrix (f(t), t*f(t)), with f(t) = F^{[-1]}(t)/t, where F(x) = x/(1 - x^2 - x^3). The expansion of f(t) is given in A319201, the sequence of column k = 0.
This gives the inverse Matrix (with upper diagonals filled with 0's) of the Riordan matrix from A104578 for any finite dimension.
The row sums give A321204, and the alternating row sums give A321205.
The A- and Z-sequences of this inverse Riordan triangle of (F(x)/x, F(x)) are A = [1, 0, -1, -1] generated by 1/(F(x)/x), and Z = [0,-1, -1] generated from 1/F(x) - 1/x. See the link W. Lang link for A- and Z- sequences in A006232 with references.
For the Boas-Buck recurrence of Riordan triangles see the Aug 10 2017 remark in A046521, also for the reference. For this Bell-type triangle the sequence b is generated by B(t) = (log(f(t)))' = (1/(1/f(t) + t^2*f(t) + 2*t^3*f(t)^2) - 1)/t, and is given in A319204.

Examples

			The triangle T(n, k) begins:
n\k     0   1    2    3   4  5  6  7  8  9 10 ...
-------------------------------------------------
0:      1
1:      0   1
2:     -1   0    1
3:     -1  -2    0    1
4:      2  -2   -3    0   1
5;      5   5   -3   -4   0  1
6:     -2  12    9   -4  -5  0  1
7:    -21  -7   21   14  -5 -6  0  1
8:    -14 -56  -16   32  20 -6 -7  0  1
9:     72 -30 -108  -30  45 27 -7 -8  0  1
10:   138 210  -45 -180 -50 60 35 -8 -9  0  1
...
Recurrence from A- and Z-sequence: 5 =  T(5, 0) = -(-2 + (-3)); 9 = T(6, 2) = 5 - (- 4 + 0).
Recurrence of Boas-Buck type, with B = [0,-2,-3, 6, ...] = A319204: 9 = T(6, 2) = ((2+1)/(6-2))*(6*1 + (-3)*0 + (-2)*(-3) + 0*(-3)) = (3/4)*12 = 9.
		

Crossrefs

Programs

  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    nmax = 10;
    R = RiordanArray[1/(1 - #^2 - #^3)&, #/(1 - #^2 - #^3)&, nmax+1];
    M = Inverse[PadRight[#, nmax+1]& /@ R];
    T[n_, k_] := M[[n+1, k+1]];
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 19 2019 *)

Formula

Recurrence from the Z- and A-sequence: T(n, k) = 0 if n < k; T(0, 0) = 1;
T(n, 0) = -(T(n-1, 1) + T(n-1, 2)), for n >= 1; and T(n, m) = T(n-1, k-1) - T(n-1, k+1) - T(n-1, k+2), for n>=1 and k >= 1.
Boas-Buck recurrence with B(n) = A319204(n): T(n, k) = ((k+1)/(n-k))*Sum_{j=k..n-1} b(n-1-j)*T(j, k), for n >= 1, k = 0,1, ..., n-1, and input T(n,n) = 1, for n >= 0.
G.f. of row polynomials R(n,x) = Sum_{k=0..n} T(n, k)*x^k is G(x,z) = f(z)/(1-x*z*f(z)) with the expansion of f given in A319201.
G.f. of column sequences Gcol(k, x) = x^k*f(x)^{k+1}, for k >= 0.

A319202 a(n) is the A-sequence for the Riordan matrix R = (1/(1- x^2 - x^3), x/(1 - x^2 - x^3)) from A104578.

Original entry on oeis.org

1, 0, 1, 1, -1, -3, 0, 10, 10, -28, -70, 42, 348, 198, -1353, -2431, 3575, 15587, 702, -74698, -89726, 264214, 753236, -441864, -4308174, -2823020, 18594787, 36373695, -52468405, -249712725, -24858975, 1267523445, 1639209195, -4671244455, -14174703810
Offset: 0

Views

Author

Wolfdieter Lang, Oct 29 2018

Keywords

Comments

See the comment in A319201, and the recurrence formula for A104578 from the A- and Z-sequences.
The Z-sequence for R is given by a(n+1), n >= 0.

Crossrefs

Formula

a(n) = [t^n] (1/f(t)), where f(t) = F^{[-1]}(t)/t, with the compositional inverse F^{[-1]}(t) of F(x) = 1/(1 - x^2 - x^3). The expansion of f is given in A319201.

A001057 Canonical enumeration of integers: interleaved positive and negative integers with zero prepended.

Original entry on oeis.org

0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15, 16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23, 24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
Offset: 0

Views

Author

Keywords

Comments

Go forwards and backwards with increasing step sizes. - Daniele Parisse and Franco Virga, Jun 06 2005
The partial sums of the divergent series 1 - 2 + 3 - 4 + ... give this sequence. Euler summed it to 1/4 which was one of the first examples of summing divergent series. - Michael Somos, May 22 2007
From Peter Luschny, Jul 12 2009: (Start)
The general formula for alternating sums of powers is in terms of the Swiss-Knife polynomials P(n,x) A153641 2^(-n-1)(P(n,1)-(-1)^k P(n,2k+1)). Thus
a(k) = 2^(-2)(P(1,1)-(-1)^k P(1,2k+1)). (End)
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=4, a(n-3)=(-1)^(n-1)*coeff(charpoly(A,x),x). - Milan Janjic, Jan 26 2010
Cantor ordering of the integers producing a 1-1 and onto correspondence between the natural numbers and the integers showing that the set Z of integers has the same cardinality as the set N of natural numbers. The cardinal of N is the first transfinite cardinal aleph_null (or aleph_naught), which is the cardinality of a given infinite set if and only if it is countably infinite (denumerable), i.e., it can be put in 1-1 and onto correspondence (with a proper Cantor ordering) with the natural numbers. - Daniel Forgues, Jan 23 2010
a(n) is the determinant of the (n+2) X (n+2) (0,1)-Toeplitz matrix M satisfying: M(i,j)=0 iff i=j or i=j-1. The matrix M arises in the variation of ménage problem where not a round table, but one side of a rectangular table is considered (see comments of Vladimir Shevelev in A000271). Namely M(i,j) defines the class of permutations p of 1,2,...,n+2 such that p(i)<>i and p(i)<>i+1 for i=1,2,...,n+1, and p(n+2)<>n+2. And a(n) is also the difference between the number of even and odd such permutations. - Dmitry Efimov, Mar 02 2017

Examples

			G.f. = x - x^2 + 2*x^3 - 2*x^4 + 3*x^5 - 3*x^6 + 4*x^7 - 4*x^8 + 5*x^9 - 5*x^10 + ...
		

Crossrefs

Cf. A008619, A004526, A166711, A166871, A130472 (negation), A142150 (partial sums), A010551 (partial products for n > 0).
Alternating row sums of A104578 are a(n+1), for n >= 0.

Programs

  • Haskell
    a001057 n = (n' + m) * (-1) ^ (1 - m) where (n',m) = divMod n 2
    a001057_list = 0 : concatMap (\x -> [x,-x]) [1..]
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Maple
    a := n -> (1-(-1)^n*(2*n+1))/4; # Peter Luschny, Jul 12 2009
  • Mathematica
    Join[{0},Riffle[Range[35],-Range[35]]] (* Harvey P. Dale, Sep 21 2011 *)
    a[ n_] := -(-1)^n Ceiling[n/2]; (* Michael Somos, Jun 05 2013 *)
    LinearRecurrence[{-1, 1, 1}, {0, 1, -1}, 63] (* Jean-François Alcover, Jan 07 2019 *)
  • PARI
    {a(n) = if( n%2, n\2 + 1, -n/2)}; /* Michael Somos, Jul 20 1999 */
    
  • Python
    def a(n): return n//2 + 1 if n%2 else -n//2
    print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 14 2022

Formula

Euler transform of [-1, 2] is sequence a(n+1). - Michael Somos, Jun 11 2003
G.f.: x / ((1 + x) * (1 - x^2)). - Michael Somos, Jul 20 1999
E.g.f.: (exp(x) - (1 - 2*x) * exp(-x)) / 4. - Michael Somos, Jun 11 2003
a(n) = 1 - 2*a(n-1) -a(n-2); a(2*n) = -n, a(2*n+1) = n+1. - Michael Somos, Jul 20 1999
|a(n+1)| = A008619(n). |a(n-1)| = A004526(n). - Michael Somos, Jul 20 1999
a(n) = -a(n-1) + a(n-2) + a(n-3). a(n) = (-1)^(n+1) * floor((n+1) / 2). - Michael Somos, Jun 11 2003
a(1) = 1, a(n) = a(n-1)+n or a(n-1)-n whichever is closer to 0 on the number line. Or abs(a(n)) = min{abs(a(n-1)+n), abs(a(n-1)-n)}. - Amarnath Murthy, Jul 01 2003
a(n) = Sum_{k=0..n} k*(-1)^(k+1). - Paul Barry, Aug 20 2003
a(n) = (1-(2n+1)*(-1)^n)/4. - Paul Barry, Feb 02 2004
a(0) = 0; a(n) = (-1)^(n-1) * (n-|a(n-1)|) for n >= 1. - Rick L. Shepherd, Jul 14 2004
a(n) = a(n-1)-n*(-1)^n, a(0)=0; or a(n) = -a(n-1)+(1-(-1)^n)/2, a(0)=0. - Daniele Parisse and Franco Virga, Jun 06 2005
a(n) = ceiling(n/2) * (-1)^(n+1), n >= 0. - Franklin T. Adams-Watters, Nov 25 2011 (corrected by Daniel Forgues, Jul 21 2012)
a(n) = a(-1-n) for all n in Z. - Michael Somos, Jun 05 2013
Sum_{n>=1} 1/a(n) = 0. - Jaume Oliver Lafont, Jul 14 2017

Extensions

Thanks to Michael Somos for helpful comments.
Name edited by Franklin T. Adams-Watters, Jan 30 2012

A319201 Expansion of f(t) = F^{[-1]}(t)/t, where F(x) = x/(1 - x^2 - x^3).

Original entry on oeis.org

1, 0, -1, -1, 2, 5, -2, -21, -14, 72, 138, -165, -803, -143, 3575, 4732, -11674, -36244, 15130, 195738, 152456, -799102, -1700272, 2042975, 11038183, 2582670, -53547795, -76684530, 185864265, 618689190, -231325605, -3506922585, -2974386450, 14866619160, 33459332610, -38401746930, -223156727472
Offset: 0

Views

Author

Wolfdieter Lang, Nov 06 2018

Keywords

Comments

The compositional inverse F^{[-1]} of F(x) = x/(1 - x^2 - x^3) (appearing in the Riordan matrix of the Bell type R = (F(x)/x, F(x)) from A104578) is needed for the inverse matrix of R, the Riordan matrix R^(-1) = (f(t), t*f(t)).
This function f(t) is also needed for the A- and Z-sequences of this Riordan matrix R, namely A(n) = [t^n](1/f(t)) = A319202(n) and Z(n) = [t^n]((1/t)*(1/f(t) - 1)) = A319202(n+1).
For the expansion of the compositional inverse of x/(1 + x^2 + x^3) see A001005.

Examples

			a(8) = (1/9)*[x^8] (1- x^2 - x^3)^9 = (1/9)*(-126) = -14.
a(8) = (1/9)*(- 9!/(6!*1!*2!) + 9!/(5!*0!*4!)) = -14, from the two solutions for [e2, e3], namely [1, 2] (parity odd) and [0, 4] (parity even).
		

Crossrefs

Programs

  • Maple
    f := series(x/(1 - x^2 -x^3), x, 40):
    r := gfun:-seriestoseries(f, 'revogf'):
    gf := convert(r, polynom) / x:
    seq(coeff(gf,x,n), n=0..36); # Peter Luschny, Nov 09 2018

Formula

a(n) = [t^n] G(t), where G(t) = F^{[-1]}(t)/t, and F(x) = x/(1 - x^2 - x^3).
O.g.f.: G(t) can be computed by Lagrange inversion of F.
a(n) = b(n+1)/(n+1), for n >= 0, where b(n+1) is the coefficient of x^n of (1 - x^2 - x^3)^(n+1). This follows from the Lagrange inversion series for G(x) = F^{[-1]}(x)/x.
a(n) = (1/(n+1))*(Sum_{2*e2 + 3*e3 = n} (-1)^{e2 + e3}*(n+1)!/(n+1 - (e2 + e3))!*e2!*e3!) (from the multinomial formula for (x1 + x2 + x3)^(n+1)) with x1 = 1, x2 = -x^2 and x3 = -x^3. For the solutions of 2*e2 + 3*e3 = n >= 2, and the parity of e2 + e3, see the array A321201.

A321196 Riordan triangle T = (1/(1 + x^2 - x^3), x/(1 + x^2 - x^3)).

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 1, -2, 0, 1, 1, 2, -3, 0, 1, -2, 3, 3, -4, 0, 1, 0, -6, 6, 4, -5, 0, 1, 3, -1, -12, 10, 5, -6, 0, 1, -2, 12, -4, -20, 15, 6, -7, 0, 1, -3, -7, 30, -10, -30, 21, 7, -8, 0, 1, 5, -16, -15, 60, -20, -42, 28, 8, -9, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Nov 09 2018

Keywords

Comments

This is the (ordinary) convolution triangle based on A077961 (the column k = 0 of T).
The row polynomials R(n, x) := Sum_{k=0..n} T(n, k)*x^k, with R(-1, x) = 0, appear in the Cayley-Hamilton formula for nonnegative powers of a 3 X 3 matrix with Det M = sigma(3; 3) = x1*x2*x3 = +1, sigma(3; 2) := x1*x2 + x1*x*3 + x2*x^3 = +1 and Tr M = sigma(3; 1) = x1 + x2 = x, where x1, x2, and x3 are the eigenvalues of M, and sigma the elementary symmetric functions, as M^n = R(n-2, x)*M^2 + (-R(n-3, x) + R(n-4, x))*M + R(n-3, x)*1_3, for n >= 3, where M^0 = 1_3 is the 3 X 3 unit matrix.
For the Cayley-Hamilton formula for 3 X 3 matrices with Det M = +1, sigma(3,2) = -1 and Tr(M) = x see A104578.
The row sums give A133872 (repeat(1, 1, 0, 0)). The alternating row sums give A057597(n+2), for n >= 0.
The Riordan triangle (1/(1 + x^2 + x^3), x/(1 + x^2 + x^3)) has entries t(n, m) = (-1)^(n-m)*T(n, m) (from the g.f. G(-x, -z), where the g.f. G of T is given below).
The inverse of Riordan T is T^{-1}, given in A321198.

Examples

			The triangle T(n, k) begins:
n\k  0   1   2   3   4   5  6  7  8  9 10 ...
---------------------------------------------
0:   1
1:   0   1
2:  -1   0   1
3:   1  -2   0   1
4:   1   2  -3   0   1
5:  -2   3   3  -4   0   1
6:   0  -6   6   4  -5   0  1
7:   3  -1 -12  10   5  -6  0  1
8:  -2  12  -4 -20  15   6 -7  0  1
9:  -3  -7  30 -10 -30  21  7 -8  0  1
10:  5 -16 -15  60 -20 -42 28  8 -9  0  1
...
Cayley-Hamilton formula for the matrix TS(x) =[[x,-1,1], [1,0,0], [0,1,0]] with Det(TS(x)) = +1, sigma(3, 2) = +1, and Tr(TS(x)) = x. For n = 3: TS(x)^3 = R(1, x)*TS(x)^2 + (-R(0, x) + R(-1, x))*TS(x) + R(0, x)*1_3 = x*TS(x)^2 - TS(x) + 1_3. Compare this for x = -1 with r^3 = R(3)*r^2 + (-R(2) + R(1))*r + R(2)*1 = r^2 - r + 1, where r = 1/t = A192918, with the tribonacci constant t = A058265, and R(n) = A057597(n) = R(n-2, -1).
Recurrence: T(5, 2) = T(4, 1) - T(3, 2) + T(2, 2) = 1 -(-1) + 1 = 3.
Boas-Buck type recurrence with B = {0, -2, 3, ...}:
  T(5, 2) = ((2+1)/(5-2))*(3*1 + (-2)*0 + 0*(-3)) = 1*3 = 3.
Z- and A-recurrence with A(n) = {1, 0, -1, 1, -1, ...} and Z(n) = A(n+1):
  T(4, 0) = 0*T(3, 0) - 1*T(3, 1) + 1*T(3, 2) - 1*T(3, 3) = 0 + 2 + 0 - 1 = 1.
  T(5, 2) = 1*T(4, 1) + 0*T(4, 2) - 1*T(4, 3) + 1*T(4, 4) = 2 + 0 + 0 + 1 = 3.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n - 1, k - 1] - T[n - 2, k] + T[n - 3, k]; T[0, 0] = 1; T[, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jul 06 2019 *)
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(1/(1 + x^2 - x^3), x/(1 + x^2 - x^3), 11) # Peter Luschny, Nov 13 2018

Formula

T(n, k) = T(n-1, k-1) - T(n-2, k) + T(n-3, k), T(0, 0) = 1, T(n,k) = 0 if n < k or if k < 0. (Cf. A104578.)
The Riordan property T = (G(x), x*G(x)) with G(x) = 1/(1 + x^2 - x^3) implies the following.
G.f. of row polynomials R(n, x) is G(x, z) = 1/(1 - x*z + z^2 - z^3).
G.f. of column sequence k: x^k/(1 + x^2 - x^3)^(k+1), k >= 0.
Boas-Buck recurrence (see the Aug 10 2017 remark in A046521, also for two references):
T(n, k) = ((k+1)/(n-k))*Sum_{j=k..n-1} B(n-1-j)*T(j, k), for n >= 1, k = 0,1, ..., n-1, and input T(n, n) = 1, for n >= 0. Here B(n) = [x^n]*(d/dx)log(G(x)) = x*(-2 + 3*x)/(1 + x^2 - x^3) = (-1)^n*A112455(n+1), for n >= 0.
Recurrences from the A- and Z- sequences (see the W. Lang link under A006232 with references), which are A(n) = A321197(n) and Z(n) = A(n+1).
T(0, 0) = 1, T(n, k) = 0 for n < k, and
T(n, 0) = Sum_{j=0..n-1} Z(j)*T(n-1, j), for n >= 1, and
T(n, k) = Sum_{j=0..n-k} A(j)*T(n-1, k-1+j), for n >= m >= 1.
Showing 1-5 of 5 results.