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 45 results. Next

A113287 Triangle T, read by rows, where row n of T equals row n of matrix (n+1)-th power of triangle A112555.

Original entry on oeis.org

1, 2, 1, -3, 0, 1, 4, 4, 4, 1, -5, -10, -10, 0, 1, 6, 18, 24, 12, 6, 1, -7, -28, -49, -42, -21, 0, 1, 8, 40, 88, 104, 72, 24, 8, 1, -9, -54, -144, -216, -198, -108, -36, 0, 1, 10, 70, 220, 400, 460, 340, 160, 40, 10, 1, -11, -88, -319, -682, -946, -880, -550, -220, -55, 0, 1
Offset: 0

Views

Author

Paul D. Hanna, Oct 23 2005

Keywords

Comments

Remarkably, the matrix logarithm (A113290) is an integer triangle. Matrix m-th power of A112555 = I + m*(A112555 - I) where I = identity matrix.

Examples

			Triangle begins:
1;
2,1;
-3,0,1;
4,4,4,1;
-5,-10,-10,0,1;
6,18,24,12,6,1;
-7,-28,-49,-42,-21,0,1;
8,40,88,104,72,24,8,1;
-9,-54,-144,-216,-198,-108,-36,0,1;
10,70,220,400,460,340,160,40,10,1; ...
		

Crossrefs

Cf. A112555, A113288 (inverse), A113290 (log), A113291, A072374.

Programs

  • PARI
    {T(n,k)=local(x=X+X*O(X^n),y=Y+Y*O(Y^k)); polcoeff(polcoeff(1/(1-x*y)+x*(x+2)/((1-x*y)^2*(1+x+x*y)^2),n,X),k,Y)}

Formula

G.f.: A(x, y) = 1/(1-x*y) + x*(x+2)/((1-x*y)^2*(1+x+x*y)^2).

A112556 Sums of squared terms in rows of triangle A112555.

Original entry on oeis.org

1, 2, 2, 4, 10, 32, 112, 408, 1514, 5680, 21472, 81644, 311896, 1196132, 4602236, 17757184, 68680170, 266200112, 1033703056, 4020716124, 15662273840, 61092127492, 238582873476, 932758045124, 3650336341240, 14298633670932, 56055986383412, 219931273282348, 863504076182884, 3392593262288780, 13337336618626132
Offset: 0

Views

Author

Paul D. Hanna, Sep 21 2005

Keywords

Comments

First differences form A072547 and equals the unsigned central terms of triangle A112555.

Crossrefs

Programs

  • Magma
    [(1/3)*(4 - (-1/2)^n) + (n+1)*Catalan(n) - (&+[(j+1)*Catalan(j)*(-1/2)^(n-j): j in [0..n]]): n in [0..30]]; // G. C. Greubel, Jan 13 2022
    
  • Mathematica
    CoefficientList[Series[(2(1+x)/(1-x)+x/(1-4x)^(1/2))/(2+x), {x,0,30}], x] (* Harvey P. Dale, May 26 2011 *)
  • PARI
    {a(n)=local(x=X+X*O(X^n)); polcoeff((2*(1+x)/(1-x)+x/(1-4*x)^(1/2))/(2+x),n,X)}
    
  • Sage
    [(1/3)*(4 - (-1/2)^n) - sum( binomial(2*j, j)*(-1/2)^(n-j) for j in (0..n-1)) for n in (0..30)] # G. C. Greubel, Jan 13 2022

Formula

G.f.: ( 2*(1+x)/(1-x) + x/(1-4*x)^(1/2) )/(2+x).
a(n) ~ 2^(2*n) / (9*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 26 2016
a(n) = (1/3)*(4 - (-1/2)^n) - Sum_{j=0..n-1} binomial(2*j, j)*(-1/2)^(n-j). - G. C. Greubel, Jan 13 2022

A077925 Expansion of 1/((1-x)*(1+2*x)).

Original entry on oeis.org

1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, -1365, 2731, -5461, 10923, -21845, 43691, -87381, 174763, -349525, 699051, -1398101, 2796203, -5592405, 11184811, -22369621, 44739243, -89478485, 178956971, -357913941, 715827883, -1431655765, 2863311531, -5726623061
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n+1) is the reflection of a(n) through a(n-1) on the numberline. - Floor van Lamoen, Aug 31 2004
If a zero is added as the (new) a(0) in front, the sequence represents the inverse binomial transform of A001045. Partial sums are in A077898. - R. J. Mathar, Aug 30 2008
a(n) = A077953(2*n+3). - Reinhard Zumkeller, Oct 07 2008
Related to the Fibonacci sequence by an INVERT transform: if A(x) = 1+x^2*g(x) is the generating function of the a(n) prefixed with 1, 0, then 1/A(x) = 2+(x+1)/(x^2-x+1) is the generating function of 1, 0, -1, 1, -2, 3, ..., the signed Fibonacci sequence A000045 prefixed with 1. - Gary W. Adamson, Jan 07 2011
Also: Gaussian binomial coefficients [n+1,1], or q-integers, for q=-2, diagonal k=1 in the triangular (or column r=1 in the square) array A015109. - M. F. Hasler, Nov 04 2012
With a leading zero, 0, 1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, ... we obtain the Lucas U(-1,-2) sequence. - R. J. Mathar, Jan 08 2013
Let m = a(n). Then 18*m^2 - 12*m + 1 = A000225(2n+3). - Roderick MacPhee, Jan 17 2013

Examples

			G.f. = 1 - x + 3*x^2 - 5*x^3 + 11*x^4 - 21*x^5 + 43*x^6 - 85*x^7 + ...
		

Crossrefs

Cf. A001045 (unsigned version).
Cf. A014983, A014985, A014986. - Zerinvary Lajos, Dec 16 2008

Programs

Formula

G.f.: 1/(1+x-2*x^2).
a(n) = (1-(-2)^(n+1))/3. - Vladeta Jovovic, Apr 17 2003
a(n) = Sum_{k=0..n} (-2)^k. - Paul Barry, May 26 2003
a(n+1) - a(n) = A122803(n). - R. J. Mathar, Aug 30 2008
a(n) = Sum_{k=0..n} A112555(n,k)*(-2)^k. - Philippe Deléham, Sep 11 2009
a(n) = A082247(n+1) - 1. - Philippe Deléham, Oct 07 2009
G.f.: Q(0)/(3*x), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k + 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k - 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 2*x)/( x*(4*k+1 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (2*exp(-2*x) + exp(x))/3. - Ilya Gutkovskiy, Nov 12 2016
a(n) = A086893(n+2) - A061547(n+3), n >= 0. - Yosu Yurramendi, Jan 16 2017
a(n) = (-1)^n*A001045(n+1). - M. F. Hasler, Feb 13 2020
a(n) - a(n-1) = a(n-1) - a(n+1) = (-2)^n, a(n+1) = - a(n) + 2*a(n-1) = 1 - 2*a(n). - Michael Somos, Feb 22 2023

A112468 Riordan array (1/(1-x), x/(1+x)).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 2, -2, 1, 1, 1, -2, 4, -3, 1, 1, 0, 3, -6, 7, -4, 1, 1, 1, -3, 9, -13, 11, -5, 1, 1, 0, 4, -12, 22, -24, 16, -6, 1, 1, 1, -4, 16, -34, 46, -40, 22, -7, 1, 1, 0, 5, -20, 50, -80, 86, -62, 29, -8, 1, 1, 1, -5, 25, -70, 130, -166, 148, -91, 37, -9, 1, 1, 0, 6, -30, 95, -200, 296, -314, 239, -128, 46, -10, 1
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Row sums are A040000. Diagonal sums are A112469. Inverse is A112467. Row sums of k-th power are 1, k+1, k+1, k+1, .... Note that C(n,k) = Sum_{j=0..n-k} C(n-j-1, n-k-j).
Equals row reversal of triangle A112555 up to sign, where log(A112555) = A112555 - I. Unsigned row sums equals A052953 (Jacobsthal numbers + 1). Central terms of even-indexed rows are a signed version of A072547. Sums of squared terms in rows yields A112556, which equals the first differences of the unsigned central terms. - Paul D. Hanna, Jan 20 2006
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 respectively (see the square array in A112739). - Philippe Deléham, Feb 22 2014

Examples

			Triangle starts
  1;
  1,  1;
  1,  0,  1;
  1,  1, -1,  1;
  1,  0,  2, -2,  1;
  1,  1, -2,  4, -3,  1;
  1,  0,  3, -6,  7, -4,  1;
Matrix log begins:
  0;
  1,  0;
  1,  0,  0;
  1,  1, -1,  0;
  1,  1,  1, -2,  0;
  1,  1,  1,  1, -3,  0; ...
Production matrix begins
  1,  1,
  0, -1,  1,
  0,  0, -1,  1,
  0,  0,  0, -1,  1,
  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0,  0, -1,  1.
- _Paul Barry_, Apr 08 2011
		

Crossrefs

Cf. A174294, A174295, A174296, A174297. - Mats Granvik, Mar 15 2010
Cf. A072547 (central terms), A112555 (reversed rows), A112465, A052953, A112556, A112739, A119258.
See A279006 for another version.

Programs

  • GAP
    T:= function(n,k)
        if k=0 or k=n then return 1;
        else return T(n-1,k-1) - T(n-1,k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 13 2019
  • Haskell
    a112468 n k = a112468_tabl !! n !! k
    a112468_row n = a112468_tabl !! n
    a112468_tabl = iterate (\xs -> zipWith (-) ([2] ++ xs) (xs ++ [0])) [1]
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Magma
    function T(n,k)
      if k eq 0 or k eq n then return 1;
      else return T(n-1,k-1) - T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 13 2019
    
  • Maple
    T := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k,k+1)*hypergeom( [1,n+1],[k+2],m)/(k+1)!; A112468 := (n,k) -> T(n,n-k,-1);
    seq(print(seq(simplify(A112468(n,k)),k=0..n)),n=0..10); # Peter Luschny, Jul 25 2014
  • Mathematica
    T[n_, 0] = 1; T[n_, n_] = 1; T[n_, k_ ]:= T[n, k] = T[n-1, k-1] - T[n-1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* Jean-François Alcover, Mar 06 2013 *)
  • PARI
    {T(n,k)=local(m=1,x=X+X*O(X^n),y=Y+Y*O(Y^k)); polcoeff(polcoeff((1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x),n,X),k,Y)} \\ Paul D. Hanna, Jan 20 2006
    
  • PARI
    T(n,k) = if(k==0 || k==n, 1, T(n-1, k-1) - T(n-1, k)); \\ G. C. Greubel, Nov 13 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or n<0): return 0
        elif (k==0 or k==n): return 1
        else: return T(n-1, k-1) - T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 13 2019
    

Formula

Triangle T(n,k) read by rows: T(n,0)=1, T(n,k) = T(n-1,k-1) - T(n-1,k). - Mats Granvik, Mar 15 2010
Number triangle T(n, k)= Sum_{j=0..n-k} C(n-j-1, n-k-j)*(-1)^(n-k-j).
G.f. of matrix power T^m: (1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x). G.f. of matrix log: x*(1-2*x*y+x^2*y)/(1-x*y)^2/(1-x). - Paul D. Hanna, Jan 20 2006
T(n, k) = R(n,n-k,-1) where R(n,k,m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k,k+1)*hyper2F1([1,n+1],[k+2],m)/(k+1)!. - Peter Luschny, Jul 25 2014

A059259 Triangle read by rows giving coefficient T(i,j) of x^i y^j in 1/(1-x-x*y-y^2) = 1/((1+y)(1-x-y)) for (i,j) = (0,0), (1,0), (0,1), (2,0), (1,1), (0,2), ...

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 0, 1, 3, 4, 2, 1, 1, 4, 7, 6, 3, 0, 1, 5, 11, 13, 9, 3, 1, 1, 6, 16, 24, 22, 12, 4, 0, 1, 7, 22, 40, 46, 34, 16, 4, 1, 1, 8, 29, 62, 86, 80, 50, 20, 5, 0, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 1, 10, 46, 128, 239, 314, 296, 200
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2001

Keywords

Comments

This sequence provides the general solution to the recurrence a(n) = a(n-1) + k*(k+1)*a(n-2), a(0)=a(1)=1. The solution is (1, 1, k^2 + k + 1, 2*k^2 + 2*k + 1, ...) whose coefficients can be read from the rows of the triangle. The row sums of the triangle are given by the case k=1. These are the Jacobsthal numbers, A001045. Viewed as a square array, its first row is (1,0,1,0,1,...) with e.g.f. cosh(x), g.f. 1/(1-x^2) and subsequent rows are successive partial sums given by 1/((1-x)^n * (1-x^2)). - Paul Barry, Mar 17 2003
Conjecture: every second column of this triangle is identical to a column in the square array A071921. For example, column 4 of A059259 (1, 3, 9, 22, 46, ...) appears to be the same as column 3 of A071921; column 6 of A059259 (1, 4, 16, 50, 130, 296, ...) appears to be the same as column 4 of A071921; and in general column 2k of A059259 appears to be the same as column k+1 of A071921. Furthermore, since A225010 is a transposition of A071921 (ignoring the latter's top row and two leftmost columns), there appears to be a correspondence between column 2k of A059259 and row k of A225010. - Mathew Englander, May 17 2014
T(n,k) is the number of n-tilings of a (one-dimensional) board that use k (1,1)-fence tiles and n-k squares. A (1,1)-fence is a tile composed of two pieces of width 1 separated by a gap of width 1. - Michael A. Allen, Jun 25 2020
See the Edwards-Allen 2020 paper, page 14, for proof of Englander's conjecture. - Michael De Vlieger, Dec 10 2020

Examples

			Triangle begins:
  1;
  1,  0;
  1,  1,  1;
  1,  2,  2,   0;
  1,  3,  4,   2,   1;
  1,  4,  7,   6,   3,   0;
  1,  5, 11,  13,   9,   3,   1;
  1,  6, 16,  24,  22,  12,   4,   0;
  1,  7, 22,  40,  46,  34,  16,   4,  1;
  1,  8, 29,  62,  86,  80,  50,  20,  5,  0;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5, 1;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 0;
...
		

Crossrefs

See A059260 for an explicit formula.
Diagonals of this triangle are given by A006498.
Similar to the triangles A035317, A080242, A108561, A112555.

Programs

  • Maple
    read transforms; 1/(1-x-x*y-y^2); SERIES2(%,x,y,12); SERIES2TOLIST(%,x,y,12);
  • Mathematica
    T[n_, 0]:= 1; T[n_, n_]:= (1+(-1)^n)/2; T[n_, k_]:= T[n, k] = T[n-1, k] + T[n-1, k-1]; Table[T[n, k], {n, 0, 10} , {k, 0, n}]//Flatten (* G. C. Greubel, Jan 03 2017 *)
  • PARI
    {T(n,k) = if(k==0, 1, if(k==n, (1+(-1)^n)/2, T(n-1,k) +T(n-1,k-1)) )};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Apr 29 2019
  • Sage
    def A059259_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return (-1)^n
            if k==0: return 0
            return prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^(n-k+1)*prec(n+1, k) for k in (1..n)]
    for n in (1..12): print(A059259_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

G.f.: 1/(1 - x - x*y - y^2).
As a square array read by antidiagonals, this is T(n, k) = Sum_{i=0..n} (-1)^(n-i)*C(i+k, k). - Paul Barry, Jul 01 2003
T(2*n,n) = A026641(n). - Philippe Deléham, Mar 08 2007
T(n,k) = T(n-1,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0) = T(1,0) = T(2,0) = T(2,1) = T(2,2)=1, T(1,1)=0, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Nov 24 2013
T(n,0) = 1, T(n,n) = (1+(-1)^n)/2, and T(n,k) = T(n-1,k) + T(n-1,k-1) for 0 < k < n. - Mathew Englander, May 24 2014
From Michael A. Allen, Jun 25 2020: (Start)
T(n,k) + T(n-1,k-1) = binomial(n,k) if n >= k > 0.
T(2*n-1,2*n-2) = T(2*n,2*n-1) = n, T(2*n,2*n-2) = n^2, T(2*n+1,2*n-1) = n*(n+1) for n > 0.
T(n,2) = binomial(n-2,2) + n - 1 for n > 1 and T(n,3) = binomial(n-3,3) + 2*binomial(n-2,2) for n > 2.
T(2*n-k,k) = A123521(n,k). (End)

A035317 Pascal-like triangle associated with A000670.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 4, 7, 6, 3, 1, 5, 11, 13, 9, 3, 1, 6, 16, 24, 22, 12, 4, 1, 7, 22, 40, 46, 34, 16, 4, 1, 8, 29, 62, 86, 80, 50, 20, 5, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 1, 11, 56, 174, 367, 553, 610, 496, 295, 125
Offset: 0

Views

Author

Keywords

Comments

From Johannes W. Meijer, Jul 20 2011: (Start)
The triangle sums, see A180662 for their definitions, link this "Races with Ties" triangle with several sequences, see the crossrefs. Observe that the Kn4 sums lead to the golden rectangle numbers A001654 and that the Fi1 and Fi2 sums lead to the Jacobsthal sequence A001045.
The series expansion of G(x, y) = 1/((y*x-1)*(y*x+1)*((y+1)*x-1)) as function of x leads to this sequence, see the second Maple program. (End)
T(2n,k) = the number of hatted frog arrangements with k frogs on the 2xn grid. See the linked paper "Frogs, hats and common subsequences". - Chris Cox, Apr 12 2024

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  2;
  1,  3,  4,   2;
  1,  4,  7,   6,   3;
  1,  5, 11,  13,   9,   3;
  1,  6, 16,  24,  22,  12,   4;
  1,  7, 22,  40,  46,  34,  16,   4;
  1,  8, 29,  62,  86,  80,  50,  20,  5;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6;
  ...
		

Crossrefs

Row sums are A000975, diagonal sums are A080239.
Central terms are A014300.
Similar to the triangles A059259, A080242, A108561, A112555.
Cf. A059260.
Triangle sums (see the comments): A000975 (Row1), A059841 (Row2), A080239 (Kn11), A052952 (Kn21), A129696 (Kn22), A001906 (Kn3), A001654 (Kn4), A001045 (Fi1, Fi2), A023435 (Ca2), Gi2 (A193146), A190525 (Ze2), A193147 (Ze3), A181532 (Ze4). - Johannes W. Meijer, Jul 20 2011
Cf. A181971.

Programs

  • Haskell
    a035317 n k = a035317_tabl !! n !! k
    a035317_row n = a035317_tabl !! n
    a035317_tabl = map snd $ iterate f (0, [1]) where
       f (i, row) = (1 - i, zipWith (+) ([0] ++ row) (row ++ [i]))
    -- Reinhard Zumkeller, Jul 09 2012
    
  • Maple
    A035317 := proc(n,k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
    A035317 := proc(n,k): coeff(coeftayl(1/((y*x-1)*(y*x+1)*((y+1)*x-1)), x=0, n), y, k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    t[n_, k_] := (-1)^k*(((-1)^k*(n+2)!*Hypergeometric2F1[1, n+3, k+2, -1])/((k+1)!*(n-k+1)!) + 2^(k-n-2)); Flatten[ Table[ t[n, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011, after Johannes W. Meijer *)
  • PARI
    {T(n,k)=if(n==k,(n+2)\2,if(k==0,1,if(n>k,T(n-1,k-1)+T(n-1,k))))}
    for(n=0,12,for(k=0,n,print1(T(n,k),","));print("")) \\ Paul D. Hanna, Jul 18 2012
    
  • Sage
    def A035317_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n+2, k) for k in (1..n)]
    for n in (1..11): print(A035317_row(n)) # Peter Luschny, Mar 16 2016

Formula

T(n,k) = Sum_{j=0..floor(n/2)} binomial(n-2j, k-2j). - Paul Barry, Feb 11 2003
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..k}((-1)^(i+k) * binomial(i+n-k+1,i)). (Mendelson)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = floor(n/2) + 1. (Mendelson)
Sum_{k = 0..n}((-1)^k * (n-k+1)^n * T(n, k)) = A000670(n). (Mendelson)
T(n, n-k) = A128176(n, k); T(n+k, n-k) = A158909(n, k); T(2*n-k, k) = A092879(n, k). (End)
T(2*n+1,n) = A014301(n+1); T(2*n+1,n+1) = A026641(n+1). - Reinhard Zumkeller, Jul 19 2012

Extensions

More terms from James Sellers

A108561 Triangle read by rows: T(n,0)=1, T(n,n)=(-1)^n, T(n+1,k)=T(n,k-1)+T(n,k) for 0 < k < n.

Original entry on oeis.org

1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 2, 2, 0, 1, 1, 3, 4, 2, 1, -1, 1, 4, 7, 6, 3, 0, 1, 1, 5, 11, 13, 9, 3, 1, -1, 1, 6, 16, 24, 22, 12, 4, 0, 1, 1, 7, 22, 40, 46, 34, 16, 4, 1, -1, 1, 8, 29, 62, 86, 80, 50, 20, 5, 0, 1, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, -1, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 0, 1, 1, 11, 56, 174, 367
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Comments

Sum_{k=0..n} T(n,k) = A078008(n);
Sum_{k=0..n} abs(T(n,k)) = A052953(n-1) for n > 0;
T(n,1) = n - 2 for n > 1;
T(n,2) = A000124(n-3) for n > 2;
T(n,3) = A003600(n-4) for n > 4;
T(n,n-6) = A001753(n-6) for n > 6;
T(n,n-5) = A001752(n-5) for n > 5;
T(n,n-4) = A002623(n-4) for n > 4;
T(n,n-3) = A002620(n-1) for n > 3;
T(n,n-2) = A008619(n-2) for n > 2;
T(n,n-1) = n mod 2 for n > 0;
T(2*n,n) = A072547(n+1).
Sum_{k=0..n} T(n,k)*x^k = A232015(n), A078008(n), A000012(n), A040000(n), A001045(n+2), A140725(n+1) for x = 2, 1, 0, -1, -2, -3 respectively. - Philippe Deléham, Nov 17 2013, Nov 19 2013
(1,a^n) Pascal triangle with a = -1. - Philippe Deléham, Dec 27 2013
T(n,k) = A112465(n,n-k). - Reinhard Zumkeller, Jan 03 2014

Examples

			From _Philippe Deléham_, Nov 17 2013: (Start)
Triangle begins:
  1;
  1, -1;
  1,  0,  1;
  1,  1,  1, -1;
  1,  2,  2,  0,  1;
  1,  3,  4,  2,  1, -1;
  1,  4,  7,  6,  3,  0,  1; (End)
		

Crossrefs

Cf. A007318 (a=1), A008949(a=2), A164844(a=10).
Similar to the triangles A035317, A059259, A080242, A112555.
Cf. A072547 (central terms).

Programs

  • GAP
    Flat(List([0..13],n->List([0..n],k->Sum([0..k],i->Binomial(n,i)*(-2)^(k-i))))); # Muniru A Asiru, Feb 19 2018
  • Haskell
    a108561 n k = a108561_tabl !! n !! k
    a108561_row n = a108561_tabl !! n
    a108561_tabl = map reverse a112465_tabl
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Maple
    A108561 := (n, k) -> add(binomial(n, i)*(-2)^(k-i), i = 0..k):
    seq(seq(A108561(n,k), k = 0..n), n = 0..12); # Peter Bala, Feb 18 2018
  • Mathematica
    Clear[t]; t[n_, 0] = 1; t[n_, n_] := t[n, n] = (-1)^Mod[n, 2]; t[n_, k_] := t[n, k] = t[n-1, k] + t[n-1, k-1]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 06 2013 *)
  • Sage
    def A108561_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n, k) for k in (1..n-1)]+[(-1)^(n+1)]
    for n in (1..12): print(A108561_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

G.f.: (1-y*x)/(1-x-(y+y^2)*x). - Philippe Deléham, Nov 17 2013
T(n,k) = T(n-1,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0)=T(1,0)=1, T(1,1)=-1, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Nov 17 2013
From Peter Bala, Feb 18 2018: (Start)
T(n,k) = Sum_{i = 0..k} binomial(n,i)*(-2)^(k-i), 0 <= k <= n.
The n-th row polynomial is the n-th degree Taylor polynomial of the rational function (1 + x)^n/(1 + 2*x) about 0. For example, for n = 4, (1 + x)^4/(1 + 2*x) = 1 + 2*x + 2*x^2 + x^4 + O(x^5). (End)

Extensions

Definition corrected by Philippe Deléham, Dec 26 2013

A084247 a(n) = -a(n-1) + 2*a(n-2), a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 0, 4, -4, 12, -20, 44, -84, 172, -340, 684, -1364, 2732, -5460, 10924, -21844, 43692, -87380, 174764, -349524, 699052, -1398100, 2796204, -5592404, 11184812, -22369620, 44739244, -89478484, 178956972, -357913940, 715827884, -1431655764, 2863311532
Offset: 0

Views

Author

Paul Barry, May 23 2003

Keywords

Comments

Row sums of triangle in A112555. - Philippe Deléham, Sep 21 2009

Crossrefs

Programs

  • Magma
    [(4-(-2)^n)/3: n in [0..40]]; // Vincenzo Librandi, Aug 13 2011
    
  • Mathematica
    LinearRecurrence[{-1,2},{1,2},40] (* Harvey P. Dale, Nov 05 2016 *)
  • PARI
    Vec((1+3*x)/((1-x)*(1+2*x)) + O(x^40)) \\ Michel Marcus, Feb 25 2016
    
  • SageMath
    [(4-(-2)^n)/3 for n in range(41)] # G. C. Greubel, Apr 24 2023

Formula

Binomial transform of A084246.
a(n) = A077925(n-1) + 1.
a(n) = (4 - (-2)^n)/3.
G.f.: (1+3*x)/((1-x)*(1+2*x)).
E.g.f.: (4*exp(x) - exp(-2*x))/3.
a(n) = (-1)^(n+1)*(A078008(n+1) - A078008(n)). - Paul Curtz, Jun 30 2008, Feb 24 2021
a(n) = -2*a(n-1) + 4 . - Philippe Deléham, Sep 15 2009
a(n+1) = 2*A151575(n). - Philippe Deléham, Sep 21 2009
a(n) = A077925(n) + 3*A077925(n-1). - R. J. Mathar, Feb 24 2021

A140165 a(n) = -a(n-1) + 3*a(n-2), starting a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 1, 5, -2, 17, -23, 74, -143, 365, -794, 1889, -4271, 9938, -22751, 52565, -120818, 278513, -640967, 1476506, -3399407, 7828925, -18027146, 41513921, -95595359, 220137122, -506923199, 1167334565
Offset: 1

Views

Author

Gary W. Adamson, May 10 2008

Keywords

Comments

Row sums of triangle A140166.
Equals eigensequence of triangle A112555. - Gary W. Adamson, Jan 30 2009

Examples

			a(6) = 17 = (-1)*a(5) + 3*a(4) = (-1)*(-2) + 3*5.
a(4) = 5 = term (1,1) of X^5, where X^5 = [5,7; 7,26].
		

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=-a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(1+3*x)/(1+x-3*x^2) )); // G. C. Greubel, Dec 26 2019
    
  • Magma
    a:=[1,2]; [n le 2 select a[n] else -Self(n-1) + 3*Self(n-2): n in [1..30]]; // Marius A. Burtea, Jan 02 2020
    
  • Maple
    seq(coeff(series(x*(1+3*x)/(1+x-3*x^2), x, n+1), x, n), n = 1..30); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[Round[(-Sqrt[3])^n*(LucasL[n, 1/Sqrt[3]] - 5*Fibonacci[n, 1/Sqrt[3]]/Sqrt[3])/2], {n,0,30}] (* G. C. Greubel, Dec 26 2019 *)
    LinearRecurrence[{-1,3},{1,2},40] (* Harvey P. Dale, Jun 11 2024 *)
  • PARI
    my(x='x+O('x^30)); Vec(x*(1+3*x)/(1+x-3*x^2)) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    def A140165_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+3*x)/(1+x-3*x^2) ).list()
    a=A140165_list(30); a[1:] # G. C. Greubel, Dec 26 2019
    

Formula

a(n) = term (1,1) of X^n, where X = the 2 X 2 matrix [1,-1; -1,-2].
G.f.: x*(1+3*x)/(1+x-3*x^2). - Philippe Deléham, Dec 18 2011
a(n) = -(3*A140167(n-1) + A140167(n)). - R. J. Mathar, Apr 22 2013
a(n) = (-sqrt(3))^n*( Lucas(n, 1/sqrt(3)) - 5*Fibonacci(n, 1/sqrt(3))/sqrt(3) )/2. - G. C. Greubel, Dec 26 2019
E.g.f.: (1/13)*exp(-x/2)*(13*cosh(sqrt(13)*x/2) + 5*sqrt(13)*sinh(sqrt(13)*x/2)) - 1. - Stefano Spezia, Jan 02 2020

A165747 a(n) = 1-2n.

Original entry on oeis.org

1, -1, -3, -5, -7, -9, -11, -13, -15, -17, -19, -21, -23, -25, -27, -29, -31, -33, -35, -37, -39, -41, -43, -45, -47, -49, -51, -53, -55, -57, -59, -61, -63, -65, -67, -69, -71, -73, -75, -77, -79, -81, -83, -85, -87, -89, -91, -93, -95, -97, -99, -101, -103
Offset: 0

Views

Author

Philippe Deléham, Sep 26 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[1 - 2 n, {n, 0, 100}] (* G. C. Greubel, Apr 07 2016 *)
  • PARI
    x='x+O('x^99); Vec((1-3*x)/(1-x)^2) \\ Altug Alkan, Apr 07 2016

Formula

a(n) = -A060747(n).
a(n) = 2*a(n-1) - a(n-2), a(0)= 1, a(1)= -1.
G.f.: (1-3x)/(1-x)^2.
a(n) = Sum_{k, 0<=k<=n} A112555(n,k)*(-2)^(n-k).
E.g.f.: (1-2*x)*exp(x). - G. C. Greubel, Apr 07 2016
Showing 1-10 of 45 results. Next