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-10 of 12 results. Next

A078012 a(n) = a(n-1) + a(n-3) for n >= 3, with a(0) = 1, a(1) = a(2) = 0. This recurrence can also be used to define a(n) for n < 0.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, 2745, 4023, 5896, 8641, 12664, 18560, 27201, 39865, 58425, 85626, 125491, 183916, 269542, 395033, 578949, 848491, 1243524, 1822473, 2670964, 3914488, 5736961, 8407925
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002, Mar 08 2008

Keywords

Comments

Number of compositions of n into parts >= 3. - Milan Janjic, Jun 28 2010
From Adi Dani, May 22 2011: (Start)
Number of compositions of number n into parts of the form 3*k+1, k >= 0.
For example, a(10)=19 and all compositions of 10 in parts 1,4,7 or 10 are
(1,1,1,1,1,1,1,1,1,1), (1,1,1,1,1,1,4), (1,1,1,1,1,4,1), (1,1,1,1,4,1,1), (1,1,1,4,1,1,1), (1,1,4,1,1,1,1), (1,4,1,1,1,1,1), (4,1,1,1,1,1,1), (1,1,4,4), (1,4,1,4), (1,4,4,1), (4,1,1,4),(4,1,4,1), (4,4,1,1), (1,1,1,7), (1,1,7,1), (1,7,1,1), (7,1,1,1), (10). (End)
For n >= 0 a(n+1) is the number of 00's in the Narayana word NW(n); equivalently the number of two neighboring 0's at level n of the Narayana tree. See A257234. This implies that if a(0) is put to 0 then a(n) is the number of -1's in the Narayana word NW(n), and also at level n of the Narayana tree. - Wolfdieter Lang, Apr 24 2015

Examples

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

References

  • Taylor L. Booth, Sequential Machines and Automata Theory, John Wiley and Sons, Inc., 1967, page 331ff.

Crossrefs

Programs

  • GAP
    a:=[1,0,0];; for n in [4..50] do a[n]:=a[n-1]+a[n-3]; od; a; # G. C. Greubel, Jun 28 2019
  • Haskell
    a078012 n = a078012_list !! n
    a078012_list = 1 : 0 : 0 : 1 : zipWith (+) a078012_list
       (zipWith (+) (tail a078012_list) (drop 2 a078012_list))
    -- Reinhard Zumkeller, Mar 23 2012
    
  • Magma
    I:=[1,0,0]; [n le 3 select I[n] else Self(n-1) + Self(n-3): n in [1..50]]; // G. C. Greubel, Jan 19 2018
    
  • Maple
    A078012 := proc(n): if n=0 then 1 else add(binomial(n-3-2*i,i),i=0..(n-3)/3) fi: end: seq(A078012(n), n=0..46); # Johannes W. Meijer, Aug 11 2011
    # second Maple program:
    a:= n-> (<<0|1|0>, <0|0|1>, <1|0|1>>^n)[1, 1]:
    seq(a(n), n=0..46);  # Alois P. Heinz, May 08 2025
  • Mathematica
    CoefficientList[ Series[(1-x)/(1-x-x^3), {x,0,50}], x] (* Robert G. Wilson v, May 25 2011 *)
    LinearRecurrence[{1,0,1}, {1,0,0}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
    a[ n_]:= If[ n >= 0, SeriesCoefficient[ (1-x)/(1-x-x^3), {x, 0, n}], SeriesCoefficient[1/(1+x^2-x^3), {x, 0, -n}]]; (* Michael Somos, Feb 03 2018 *)
  • PARI
    {a(n) = if( n<0, n = -n; polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^n), n), polcoeff( (1 - x) / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, May 03 2011 */
    
  • Sage
    ((1-x)/(1-x-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 28 2019
    

Formula

a(n) = Sum_{i=0..(n-3)/3} binomial(n-3-2*i, i), n >= 1, a(0) = 1.
From Michael Somos, May 03 2011: (Start)
Euler transform of A065417.
G.f.: (1 - x) / (1 - x - x^3).
a(-n) = A077961(n). a(n+3) = A000930(n).
a(n+5) = A068921(n). (End)
a(n+1) = A013979(n-3) + A135851(n) + A107458(n), n >= 3.
G.f.: 1/(1 - Sum_{k>=3} x^k). - Joerg Arndt, Aug 13 2012
G.f.: Q(0)*(1-x)/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + x^2)/( x*(4*k+3 + x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
0 = -1 + a(n)*(a(n)*(a(n) + a(n+2)) + a(n+1)*(a(n+1) - 3*a(n+2))) + a(n+1)*(+a(n+1)*(+a(n+1) + a(n+2)) + a(n+2)*(-2*a(n+2))) + a(n+2)^3 for all n in Z. - Michael Somos, Feb 03 2018
a(-n) = a(n)*a(n+3) - a(n+1)*a(n+2) for all n in Z. - Greg Dresden, May 07 2025

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
Entry revised by N. J. A. Sloane, May 11 2025, making use of comments from Michael Somos, May 03 2011 and Greg Dresden, May 11 2025

A207170 Number of 2 X n 0..1 arrays avoiding 0 0 0 and 1 0 1 horizontally and 0 0 1 and 1 0 1 vertically.

Original entry on oeis.org

4, 16, 36, 81, 169, 361, 784, 1681, 3600, 7744, 16641, 35721, 76729, 164836, 354025, 760384, 1633284, 3508129, 7535025, 16184529, 34762816, 74666881, 160376896, 344473600, 739894401, 1589218225, 3413480625, 7331811876, 15747991081
Offset: 1

Views

Author

R. H. Hardin, Feb 15 2012

Keywords

Examples

			Some solutions for n=4
..1..1..1..1....1..0..0..1....0..1..1..0....1..1..1..1....1..0..0..1
..0..1..1..1....1..0..0..1....0..1..1..0....1..1..1..1....1..1..1..1
		

Crossrefs

Row 2 of A207169.
Cf. A002478.

Formula

Empirical: a(n) = a(n-1) +a(n-2) +3*a(n-3) +a(n-4) -a(n-5) -a(n-6) for n>7.
G.f: 4*x -x^2*(-16-20*x-29*x^2-4*x^3+13*x^4+9*x^5) / ( (x^3+2*x^2+x-1)*(x^3-x^2-1) ). - R. J. Mathar, Aug 10 2017
Empirical: 31*a(n) = 114*A002478(n) +133*A002478(n-1) +55*A002478(n) +10*A077961(n) +32*A077961(n-1) -24*A077961(n-2) for n>1. - R. J. Mathar, Nov 09 2018

A135851 a(n) = n-1, if n <= 2, otherwise A107458(n-1) + A107458(n-2).

Original entry on oeis.org

-1, 0, 1, 0, 0, 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, 2745, 4023, 5896, 8641, 12664, 18560, 27201, 39865, 58425, 85626, 125491, 183916, 269542, 395033, 578949, 848491, 1243524, 1822473, 2670964, 3914488, 5736961, 8407925
Offset: 0

Views

Author

N. J. A. Sloane, Mar 08 2008

Keywords

Examples

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

Crossrefs

Programs

  • Haskell
    a135851 n = a135851_list !! n
    a135851_list = -1 : 0 : 1 : zipWith (+) a135851_list (drop 2 a135851_list)
    -- Reinhard Zumkeller, Mar 23 2012
    
  • Magma
    [n le 3 select n-2 else Self(n-1) + Self(n-3): n in [1..61]]; // G. C. Greubel, Aug 01 2022
    
  • Mathematica
    LinearRecurrence[{1,0,1},{-1,0,1},50] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2012 *)
    a[ n_] := If[ n < 3, SeriesCoefficient[ 1 / (1 + x^2 - x^3), {x, 0, 2 - n}], SeriesCoefficient[ x^5 / (1 - x - x^3), {x, 0, n}]]; (* Michael Somos, Jan 08 2014 *)
  • PARI
    {a(n) = if( n<3, polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^(2-n)), 2-n), polcoeff( x^5 / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, Jan 08 2014 */
    
  • SageMath
    def A000930(n): return sum(binomial(n-2*j,j) for j in (0..(n//3)))
    def A135851(n): return A000930(n+2) -2*A000930(n)
    [A135851(n) for n in (0..60)] # G. C. Greubel, Aug 01 2022

Formula

From R. J. Mathar, Jul 26 2010: (Start)
a(n) = +a(n-1) +a(n-3).
a(n) = A078012(n-2), for n>=2.
G.f.: (-1 + x + x^2) / (1 - x - x^3). (End)
From Michael Somos, Jan 08 2014: (Start)
a(n) = A077961(2-n) for all n in Z.
a(n)^2 - a(n-1)*a(n+1) = A077961(n-5). (End)
a(n) = A000930(n+2) - 2*A000930(n). - G. C. Greubel, Aug 01 2022

A100218 Riordan array ((1-2*x)/(1-x), (1-x)).

Original entry on oeis.org

1, -1, 1, -1, -2, 1, -1, 0, -3, 1, -1, 0, 2, -4, 1, -1, 0, 0, 5, -5, 1, -1, 0, 0, -2, 9, -6, 1, -1, 0, 0, 0, -7, 14, -7, 1, -1, 0, 0, 0, 2, -16, 20, -8, 1, -1, 0, 0, 0, 0, 9, -30, 27, -9, 1, -1, 0, 0, 0, 0, -2, 25, -50, 35, -10, 1, -1, 0, 0, 0, 0, 0, -11, 55, -77, 44, -11, 1, -1, 0, 0, 0, 0, 0, 2, -36, 105, -112, 54, -12, 1
Offset: 0

Views

Author

Paul Barry, Nov 08 2004

Keywords

Examples

			Triangle begins as:
   1;
  -1,  1;
  -1, -2,  1;
  -1,  0, -3,  1;
  -1,  0,  2, -4,  1;
  -1,  0,  0,  5, -5,   1;
  -1,  0,  0, -2,  9,  -6,   1;
  -1,  0,  0,  0, -7,  14,  -7,  1;
  -1,  0,  0,  0,  2, -16,  20, -8,  1;
  -1,  0,  0,  0,  0,   9, -30, 27, -9,  1;
		

Crossrefs

Row sums are A100219.
Matrix inverse of A100100.
Apart from signs, same as A098599.
Very similar to triangle A111125.

Programs

  • Magma
    A100218:= func< n,k | n eq 0 select 1 else (-1)^(n+k)*(Binomial(k,n-k) + Binomial(k-1,n-k-1)) >;
    [A100218(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Mar 28 2024
    
  • Mathematica
    T[0,0]:= 1; T[1,1]:= 1; T[1,0]:= -1; T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, T[n- 1,k] +T[n-1,k-1] -2*T[n-2,k-1] +T[n-3,k-1]]; Table[T[n,k], {n,0,14}, {k,0,n} ]//Flatten (* G. C. Greubel, Mar 13 2017 *)
  • SageMath
    def A100218(n,k): return 1 if n==0 else (-1)^(n+k)*(binomial(k,n-k) + binomial(k-1,n-k-1))
    flatten([[A100218(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Mar 28 2024

Formula

Sum_{k=0..n} T(n, k) = A100219(n) (row sums).
Number triangle T(n, k) = (-1)^(n-k)*(binomial(k, n-k) + binomial(k-1, n-k-1)), with T(0, 0) = 1. - Paul Barry, Nov 09 2004
T(n,k) = T(n-1,k) + T(n-1,k-1) - 2*T(n-2,k-1) + T(n-3,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 09 2014
From G. C. Greubel, Mar 28 2024: (Start)
T(n, n-1) = A000027(n), n >= 1.
T(n, n-2) = -A080956(n-1), n >= 2.
T(2*n, n) = A280560(n).
T(2*n-1, n) = A157142(n-1), n >= 1.
T(2*n+1, n) = -A000007(n) = A154955(n+2).
T(3*n, n) = T(4*n, n) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A355021(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^n*A098601(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = -1 + 2*A077961(n) + A077961(n-2). (End)
From Peter Bala, Apr 28 2024: (Start)
This Riordan array has the form ( x*h'(x)/h(x), h(x) ) with h(x) = x*(1 - x) and hence belongs to the hitting time subgroup of the Riordan group (see Peart and Woan for properties of this subgroup).
T(n,k) = [x^(n-k)] (1/c(x))^n, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. 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)

A077962 Expansion of 1/(1+x^2+x^3).

Original entry on oeis.org

1, 0, -1, -1, 1, 2, 0, -3, -2, 3, 5, -1, -8, -4, 9, 12, -5, -21, -7, 26, 28, -19, -54, -9, 73, 63, -64, -136, 1, 200, 135, -201, -335, 66, 536, 269, -602, -805, 333, 1407, 472, -1740, -1879, 1268, 3619, 611, -4887, -4230, 4276, 9117, -46, -13393, -9071, 13439, 22464, -4368, -35903, -18096, 40271, 53999
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Programs

  • GAP
    a:=[1,0,-1];; for n in [4..70] do a[n]:=-a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 23 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( 1/(1+x^2+x^3) )); // G. C. Greubel, Jun 23 2019
    
  • Mathematica
    CoefficientList[ Series[1/(1 + x^2 + x^3), {x, 0, 70}], x] (* Robert G. Wilson v, Mar 22 2011 *)
    LinearRecurrence[{0,-1,-1},{1,0,-1},70] (* Harvey P. Dale, Dec 04 2015 *)
  • PARI
    Vec(1/(1+x^2+x^3)+O(x^70)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    (1/(1+x^2+x^3)).series(x, 70).coefficients(x, sparse=False) # G. C. Greubel, Jun 23 2019
    

Formula

a(n) = (-1)^n*A077961(n).

A199802 G.f.: 1/(1-2*x+2*x^2-x^3+x^4).

Original entry on oeis.org

1, 2, 2, 1, -1, -4, -7, -8, -5, 3, 15, 27, 32, 22, -8, -55, -104, -128, -95, 17, 200, 399, 510, 405, -11, -721, -1525, -2024, -1708, -172, 2573, 5806, 8002, 7137, 1503, -9072, -22015, -31520, -29585, -9073, 31519, 83119, 123712, 121778, 47732, -107499, -312396, -483840, -498119, -233455, 357884, 1168399, 1885694, 2025929, 1090985, -1152593
Offset: 0

Views

Author

N. J. A. Sloane, Nov 10 2011

Keywords

Crossrefs

The main sequences mentioned in the Hisrchhorn paper are A199802, A199803, A199744, A199804, A077961, A199805.

Programs

  • Mathematica
    CoefficientList[Series[1/(1-2x+2x^2-x^3+x^4),{x,0,60}],x] (* or *) LinearRecurrence[ {2,-2,1,-1},{1,2,2,1},60] (* Harvey P. Dale, May 11 2022 *)

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.

A078031 Expansion of (1-x)/(1 + x^2 - x^3).

Original entry on oeis.org

1, -1, -1, 2, 0, -3, 2, 3, -5, -1, 8, -4, -9, 12, 5, -21, 7, 26, -28, -19, 54, -9, -73, 63, 64, -136, -1, 200, -135, -201, 335, 66, -536, 269, 602, -805, -333, 1407, -472, -1740, 1879, 1268, -3619, 611, 4887, -4230, -4276, 9117, 46, -13393, 9071, 13439, -22464, -4368, 35903, -18096
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

The Ca2 sums, see A180662, of triangle A108299 equal the terms of this sequence. - Johannes W. Meijer, Aug 14 2011

Crossrefs

Programs

  • GAP
    a:=[1,-1,-1];; for n in [4..60] do a[n]:=-a[n-2]+a[n-3]; od; a; # G. C. Greubel, Aug 05 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1+x^2-x^3) )); // G. C. Greubel, Aug 05 2019
    
  • Maple
    A078031 := proc(n) option remember: coeftayl((1-x)/(1+x^2-x^3),x=0,n) end: seq(A078031(n), n=0..60); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    CoefficientList[Series[(1-x)/(1+x^2-x^3),{x,0,60}],x] (* or *) LinearRecurrence[{0,-1,1},{1,-1,-1},60] (* Harvey P. Dale, Apr 08 2012 *)
  • PARI
    Vec((1-x)/(1+x^2-x^3)+O(x^60)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • Sage
    ((1-x)/(1+x^2-x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 05 2019
    

Formula

G.f.: (1-x)/(1 + x^2 - x^3).
a(n) = -a(n-2) + a(n-3); a(0)=1, a(1)=-1, a(2)=-1. - Harvey P. Dale, Apr 08 2012

A321199 Row sums of Riordan triangle A321198.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 7, -5, 16, -40, 74, -196, 431, -999, 2433, -5575, 13600, -32264, 77794, -188630, 456078, -1113702, 2716432, -6656382, 16351231, -40236773, 99308252, -245471638, 608083547, -1508944093, 3750434282, -9336906118, 23277132752, -58112501728, 145266946742, -363574425058
Offset: 0

Views

Author

Wolfdieter Lang, Nov 12 2018

Keywords

Comments

The alternating row sums of triangle A321198 are given in A321200.

Crossrefs

Formula

a(n) = Sum_{k=0..n} A321198(n, k), n >= 0.
G.f.: f(x)/(1 - x*f(x)), with f(x) = F^{[-1]}(x)/x = Sum_{n >= 0}
(-1)^(n+1)*A001005(n)*x^n, where F^{[-1]}(x) is the compositional inverse of F(y) = y/(1 + y^2 - y^3) (see A077961 for F(y)/y).

A321200 Alternating row sums of Riordan triangle A321198.

Original entry on oeis.org

1, -1, 2, -4, 8, -18, 39, -89, 204, -472, 1110, -2616, 6231, -14909, 35861, -86705, 210364, -512480, 1252350, -3069638, 7544818, -18589202, 45907708, -113608590, 281698359, -699748003, 1741102844, -4338995332, 10828981851, -27063384783, 67722954114, -169674183372, 425590855116, -1068654838488
Offset: 0

Views

Author

Wolfdieter Lang, Nov 12 2018

Keywords

Comments

The row sums of triangle A321198 are given in A321199.

Crossrefs

Formula

a(n) = Sum_{k=0..n} A321198(n, k), n >= 0.
G.f.: f(x)/(1 + x*f(x)), with f(x) = F^{[-1]}(x)/x = Sum_{n >= 0} (-1)^(n+1)*A001005(n)*x^n, where F^{[-1]}(x) is the compositional inverse of F(y) = y/(1 + y^2 - y^3) (see A077961 for F(y)/y).
Showing 1-10 of 12 results. Next