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

A013609 Triangle of coefficients in expansion of (1+2*x)^n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 1, 6, 12, 8, 1, 8, 24, 32, 16, 1, 10, 40, 80, 80, 32, 1, 12, 60, 160, 240, 192, 64, 1, 14, 84, 280, 560, 672, 448, 128, 1, 16, 112, 448, 1120, 1792, 1792, 1024, 256, 1, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512, 1, 20, 180, 960, 3360, 8064, 13440, 15360, 11520, 5120, 1024
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,k) with steps (1,0) and two kinds of steps (1,1). The number of paths with steps (1,0) and s kinds of steps (1,1) corresponds to the expansion of (1+s*x)^n. - Joerg Arndt, Jul 01 2011
Also sum of rows in A046816. - Lior Manor, Apr 24 2004
Also square array of unsigned coefficients of Chebyshev polynomials of second kind. - Philippe Deléham, Aug 12 2005
The rows give the number of k-simplices in the n-cube. For example, 1, 6, 12, 8 shows that the 3-cube has 1 volume, 6 faces, 12 edges and 8 vertices. - Joshua Zucker, Jun 05 2006
Triangle whose (i, j)-th entry is binomial(i, j)*2^j.
With offset [1,1] the triangle with doubled numbers, 2*a(n,m), enumerates sequences of length m with nonzero integer entries n_i satisfying sum(|n_i|) <= n. Example n=4, m=2: [1,3], [3,1], [2,2] each in 2^2=4 signed versions: 2*a(4,2) = 2*6 = 12. The Sum over m (row sums of 2*a(n,m)) gives 2*3^(n-1), n >= 1. See the W. Lang comment and a K. A. Meissner reference under A024023. - Wolfdieter Lang, Jan 21 2008
n-th row of the triangle = leftmost column of nonzero terms of X^n, where X = an infinite bidiagonal matrix with (1,1,1,...) in the main diagonal and (2,2,2,...) in the subdiagonal. - Gary W. Adamson, Jul 19 2008
Numerators of a matrix square-root of Pascal's triangle A007318, where the denominators for the n-th row are set to 2^n. - Gerald McGarvey, Aug 20 2009
From Johannes W. Meijer, Sep 22 2010: (Start)
The triangle sums (see A180662 for their definitions) link the Pell-Jacobsthal triangle, whose mirror image is A038207, with twenty-four different sequences; see the crossrefs.
This triangle may very well be called the Pell-Jacobsthal triangle in view of the fact that A000129 (Kn21) are the Pell numbers and A001045 (Kn11) the Jacobsthal numbers.
(End)
T(n,k) equals the number of n-length words on {0,1,2} having n-k zeros. - Milan Janjic, Jul 24 2015
T(n-1,k-1) is the number of 2-compositions of n with zeros having k positive parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
T(n,k) is the number of chains 0=x_0Geoffrey Critzer, Oct 01 2022
Excluding the initial 1, T(n,k) is the number of k-faces of a regular n-cross polytope. See A038207 for n-cube and A135278 for n-simplex. - Mohammed Yaseen, Jan 14 2023

Examples

			Triangle begins:
  1;
  1,  2;
  1,  4,   4;
  1,  6,  12,    8;
  1,  8,  24,   32,   16;
  1, 10,  40,   80,   80,    32;
  1, 12,  60,  160,  240,   192,    64;
  1, 14,  84,  280,  560,   672,   448,    128;
  1, 16, 112,  448, 1120,  1792,  1792,   1024,    256;
  1, 18, 144,  672, 2016,  4032,  5376,   4608,   2304,    512;
  1, 20, 180,  960, 3360,  8064, 13440,  15360,  11520,   5120,  1024;
  1, 22, 220, 1320, 5280, 14784, 29568,  42240,  42240,  28160, 11264,  2048;
  1, 24, 264, 1760, 7920, 25344, 59136, 101376, 126720, 112640, 67584, 24576, 4096;
From _Peter Bala_, Apr 20 2012: (Start)
The triangle can be written as the matrix product A038207*(signed version of A013609).
  |.1................||.1..................|
  |.2...1............||-1...2..............|
  |.4...4...1........||.1..-4...4..........|
  |.8..12...6...1....||-1...6...-12...8....|
  |16..32..24...8...1||.1..-8....24.-32..16|
  |..................||....................|
(End)
		

References

  • B. N. Cyvin et al., Isomer enumeration of unbranched catacondensed polygonal systems with pentagons and heptagons, Match, No. 34 (Oct 1996), pp. 109-121.
  • G. Hotz, Zur Reduktion von Schaltkreispolynomen im Hinblick auf eine Verwendung in Rechenautomaten, El. Datenverarbeitung, Folge 5 (1960), pp. 21-27.

Crossrefs

Cf. A007318, A013610, etc.
Appears in A167580 and A167591. - Johannes W. Meijer, Nov 23 2009
From Johannes W. Meijer, Sep 22 2010: (Start)
Triangle sums (see the comments): A000244 (Row1); A000012 (Row2); A001045 (Kn11); A026644 (Kn12); 4*A011377 (Kn13); A000129 (Kn21); A094706 (Kn22); A099625 (Kn23); A001653 (Kn3); A007583 (Kn4); A046717 (Fi1); A007051 (Fi2); A077949 (Ca1); A008998 (Ca2); A180675 (Ca3); A092467 (Ca4); A052942 (Gi1); A008999 (Gi2); A180676 (Gi3); A180677 (Gi4); A140413 (Ze1); A180678 (Ze2); A097117 (Ze3); A055588 (Ze4).
(End)
T(2n,n) gives A059304.

Programs

  • Haskell
    a013609 n = a013609_list !! n
    a013609_list = concat $ iterate ([1,2] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Haskell
    a013609 n k = a013609_tabl !! n !! k
    a013609_row n = a013609_tabl !! n
    a013609_tabl = iterate (\row -> zipWith (+) ([0] ++ row) $
                                    zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Jul 22 2013, Feb 27 2013
    
  • Magma
    [2^k*Binomial(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Sep 17 2021
    
  • Maple
    bin2:=proc(n,k) option remember; if k<0 or k>n then 0 elif k=0 then 1 else 2*bin2(n-1,k-1)+bin2(n-1,k); fi; end; # N. J. A. Sloane, Jun 01 2009
  • Mathematica
    Flatten[Table[CoefficientList[(1 + 2*x)^n, x], {n, 0, 10}]][[1 ;; 59]] (* Jean-François Alcover, May 17 2011 *)
    BinomialROW[n_, k_, t_] := Sum[Binomial[n, k]*Binomial[k, j]*(-1)^(k - j)*t^j, {j, 0, k}]; Column[Table[BinomialROW[n, k, 3], {n, 0, 10}, {k, 0, n}], Center] (* Kolosov Petro, Jan 28 2019 *)
  • Maxima
    a(n,k):=coeff(expand((1+2*x)^n),x^k);
    create_list(a(n,k),n,0,6,k,0,n); /* Emanuele Munarini, Nov 21 2012 */
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,1], [1,1]]; /* note double [1,1] */
    /* Joerg Arndt, Jul 01 2011 */
    
  • Sage
    flatten([[2^k*binomial(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Sep 17 2021

Formula

G.f.: 1 / (1 - x*(1+2*y)).
T(n,k) = 2^k*binomial(n,k).
T(n,k) = 2*T(n-1,k-1) + T(n-1,k). - Jon Perry, Nov 22 2005
Row sums are 3^n = A000244(n). - Joerg Arndt, Jul 01 2011
T(n,k) = Sum_{i=n-k..n} C(i,n-k)*C(n,i). - Mircea Merca, Apr 28 2012
E.g.f.: exp(2*y*x + x). - Geoffrey Critzer, Nov 12 2012
Riordan array (x/(1 - x), 2*x/(1 - x)). Exp(2*x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(2*x)*(1 + 6*x + 12*x^2/2! + 8*x^3/3!) = 1 + 8*x + 40*x^2/2! + 160*x^3/3! + 560*x^4/4! + .... The same property holds more generally for Riordan arrays of the form (f(x), 2*x/(1 - x)). - Peter Bala, Dec 21 2014
T(n,k) = Sum_{j=0..k} (-1)^(k-j) * binomial(n,k) * binomial(k,j) * 3^j. - Kolosov Petro, Jan 28 2019
T(n,k) = 2*(n+1-k)*T(n,k-1)/k, T(n,0) = 1. - Alexander R. Povolotsky, Oct 08 2023
For n >= 1, GCD(T(n,1), ..., T(n,n)) = GCD(T(n,1),T(n,n)) = GCD(2*n,2^n) = A171977(n). - Pontus von Brömssen, Nov 01 2024

A178420 Partial sums of floor(2^n/3).

Original entry on oeis.org

0, 1, 3, 8, 18, 39, 81, 166, 336, 677, 1359, 2724, 5454, 10915, 21837, 43682, 87372, 174753, 349515, 699040, 1398090, 2796191, 5592393, 11184798, 22369608, 44739229, 89478471, 178956956, 357913926, 715827867, 1431655749, 2863311514
Offset: 1

Views

Author

Mircea Merca, Dec 21 2010

Keywords

Comments

Essentially the same as A011377: 0 followed by the terms of A011377. - Joerg Arndt, Apr 22 2016
Partial sums of A000975(n-1).

Examples

			a(5) = 0 + 1 + 2 + 5 + 10 = 18.
		

Crossrefs

Column k=2 of A368296.

Programs

  • Magma
    [Floor((4*2^n-3*n-4)/6): n in [1..30]]; // Vincenzo Librandi, Jun 23 2011
    
  • Maple
    seq(round((4*2^n-3*n-4)/6),n=1..50)
  • Mathematica
    f[n_] := Floor[(4 2^n - 3 n - 4)/6]; f[Range[60]] (* Vladimir Joseph Stephan Orlovsky, Jan 29 2011 *)
    CoefficientList[Series[x / ((1 + x) (1 - 2 x) (1 - x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
    LinearRecurrence[{3,-1,-3,2},{0,1,3,8},40] (* or *) Accumulate[ Table[ Floor[ 2^n/3],{n,40}]] (* Harvey P. Dale, Dec 24 2015 *)
  • PARI
    a(n)=(4<Charles R Greathouse IV, Jul 31 2013

Formula

a(n) = A011377(n-1) for n >= 1. - Joerg Arndt, Apr 22 2016
a(n) = round((8*2^n - 6*n - 9)/12).
a(n) = floor((4*2^n - 3*n - 4)/6).
a(n) = ceiling((4*2^n - 3*n - 5)/6).
a(n) = round((4*2^n - 3*n - 4)/6).
a(n) = a(n-2) + 2^(n-1) - 1, n > 2.
From Bruno Berselli, Jan 15 2011: (Start)
a(n) = (8*2^n - 6*n - 9 + (-1)^n)/12.
G.f.: x^2/((1+x)*(1-2*x)*(1-x)^2). (End)
G.f.: Q(0)/(3*(1-x)^2), 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 21 2013
a(n) = 2*a(n-1) + floor(n/2) for n > 1. - Bruno Berselli, Apr 30 2014
a(n) = floor(2^(n+1)/3) - floor((n+1)/2). - Seiichi Manyama, Dec 22 2023

A166753 Partial sums of A166752.

Original entry on oeis.org

1, 2, 5, 6, 17, 18, 61, 62, 233, 234, 917, 918, 3649, 3650, 14573, 14574, 58265, 58266, 233029, 233030, 932081, 932082, 3728285, 3728286, 14913097, 14913098, 59652341, 59652342, 238609313, 238609314, 954437197, 954437198, 3817748729, 3817748730
Offset: 0

Views

Author

Paul Barry, Oct 21 2009

Keywords

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4)) )); // G. C. Greubel, Jun 06 2019
    
  • Mathematica
    LinearRecurrence[{1,5,-5,-4,4}, {1,2,5,6,17}, 40] (* G. C. Greubel, May 24 2016 *)
    Accumulate[LinearRecurrence[{0,5,0,-4},{1,1,3,1},40]] (* Harvey P. Dale, Aug 12 2024 *)
  • PARI
    my(x='x+O('x^40)); Vec((1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4))) \\ G. C. Greubel, Sep 30 2017
    
  • Sage
    ((1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 06 2019

Formula

G.f.: (1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4)).
a(n) = a(n+1) + 5*a(n+2) - 5*a(n-3) - 4*a(n-4) + 4*a(n-5).
a(n) = (4/3)*A061547(n+1) - (1/3)*A166754(n).
a(n) = (4/3)*A061547(n+1) - (1/3)*A000975(n) + (4/3)*A011377(n-2).

A091597 Triangle read by rows: T(n,0) = A001045(n+1), T(n,n)=1, T(n,m) = T(n-1,m-1) + T(n-1,m).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 5, 5, 3, 1, 11, 10, 8, 4, 1, 21, 21, 18, 12, 5, 1, 43, 42, 39, 30, 17, 6, 1, 85, 85, 81, 69, 47, 23, 7, 1, 171, 170, 166, 150, 116, 70, 30, 8, 1, 341, 341, 336, 316, 266, 186, 100, 38, 9, 1, 683, 682, 677, 652, 582, 452, 286, 138, 47, 10, 1
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

A Jacobsthal-Pascal triangle.
Equals triangle M * Pascal's triangle, M = an infinite lower triangular Toeplitz matrix with A078008: [1, 0, 2, 2, 6, 10, 22, 42, ...] in every column. - Gary W. Adamson, May 25 2009

Examples

			Triangle begins as:
    1;
    1,   1;
    3,   2,   1;
    5,   5,   3,   1;
   11,  10,   8,   4,   1;
   21,  21,  18,  12,   5,   1;
   43,  42,  39,  30,  17,   6,   1;
   85,  85,  81,  69,  47,  23,   7,  1;
  171, 170, 166, 150, 116,  70,  30,  8, 1;
  341, 341, 336, 316, 266, 186, 100, 38, 9, 1;
		

Crossrefs

Columns include A001045, A000975, A011377.
Row sums are A059570.
Cf. A078008. - Gary W. Adamson, May 25 2009

Programs

  • GAP
    Flat(List([0..12], n->List([0..n], k-> Sum([0..n], j-> 2^j*Binomial(n-j, k+j)) ))); # G. C. Greubel, Jun 04 2019
  • Magma
    [[(&+[2^j*Binomial(n-j, k+j): j in [0..n]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 04 2019
    
  • Maple
    A091597 := proc(n,k)
        if k = 0 then
            A001045(n+1) ;
        elif k = n then
            1 ;
        elif k <0 or k > n then
            0 ;
        else
            procname(n-1,k-1)+procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Oct 05 2012
  • Mathematica
    Table[Sum[Binomial[n-j, k+j]*2^j, {j,0,n}], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 04 2019 *)
  • PARI
    {T(n,k) = sum(j=0, n, 2^j*binomial(n-j, k+j))}; \\ G. C. Greubel, Jun 04 2019
    
  • Sage
    [[sum(2^j*binomial(n-j, k+j) for j in (0..n)) for k in (0..n)] for n in [0..12]] # G. C. Greubel, Jun 04 2019
    

Formula

Number triangle: T(n, k) = Sum_{j=0..n} binomial(n-j, k+j)2^j.
Riordan array: (1/(1-x-2*x^2), x/(1-x)).
k-th column has g.f. (1/(1-x-2*x^2))*(x/(1-x))^k.
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-1) - 2*T(n-3,k) - 2*T(n-3,k-1), T(0,0)=T(1,0)=T(1,1)=T(2,2)=1, T(2,0)=3, T(2,1)=2, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Jan 11 2014

A130127 Triangle defined by A000012 * A130125, read by rows.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 2, 4, 4, 8, 3, 4, 8, 8, 16, 3, 6, 8, 16, 16, 32, 4, 6, 12, 16, 32, 32, 64, 4, 8, 12, 24, 32, 64, 64, 128, 5, 8, 16, 24, 48, 64, 128, 128, 256, 5, 10, 16, 32, 48, 96, 128, 256, 256, 512, 6, 10, 20, 32, 64, 96, 192, 256, 512, 512, 1024, 6, 12, 20, 40, 64, 128, 192, 384, 512, 1024, 1024, 2048
Offset: 1

Views

Author

Gary W. Adamson, May 11 2007

Keywords

Comments

Row sums = A011377: (1, 3, 8, 18, 39, ...). A130126 = A130125 * A000012.

Examples

			First few rows of the triangle:
  1;
  1, 2;
  2, 2,  4;
  2, 4,  4,  8;
  3, 4,  8,  8, 16;
  3, 6,  8, 16, 16, 32;
  4, 6, 12, 16, 32, 32, 64;
  ...
		

Crossrefs

Programs

  • Magma
    [[2^(k-1)*Floor((n-k+2)/2): k in [1..n]]: n in [1..12]]; // G. C. Greubel, Jun 06 2019
    
  • Mathematica
    Table[2^(k-1)*Floor[(n-k+2)/2], {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, Jun 06 2019 *)
  • PARI
    {T(n,k) = 2^(k-1)*floor((n-k+2)/2)}; \\ G. C. Greubel, Jun 06 2019
    
  • Sage
    [[2^(k-1)*floor((n-k+2)/2) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jun 06 2019

Formula

T(n,k) = 2^(k-1) * floor((n-k+2)/2). - G. C. Greubel, Jun 06 2019

Extensions

More terms added by G. C. Greubel, Jun 06 2019

A166754 a(n) = 4*A061547(n+1) - 3*A166753(n).

Original entry on oeis.org

1, 2, 9, 22, 53, 114, 241, 494, 1005, 2026, 4073, 8166, 16357, 32738, 65505, 131038, 262109, 524250, 1048537, 2097110, 4194261, 8388562, 16777169, 33554382, 67108813, 134217674, 268435401, 536870854, 1073741765, 2147483586
Offset: 0

Views

Author

Paul Barry, Oct 21 2009

Keywords

Crossrefs

Programs

  • GAP
    List([0..40], n-> (2^(n+3) + (-1)^n - (4*n+7))/2) # G. C. Greubel, Jun 04 2019
  • Magma
    [(2^(n+3) +(-1)^n -(4*n+7))/2: n in [0..40]]; // G. C. Greubel, Oct 10 2017
    
  • Mathematica
    LinearRecurrence[{3,-1,-3,2}, {1,2,9,22}, 40] (* G. C. Greubel, May 24 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x+4*x^2)/((1+x)*(1-x)^2*(1-2*x))) \\ G. C. Greubel, Oct 10 2017
    
  • Sage
    [(2^(n+3) + (-1)^n - (4*n+7))/2 for n in (0..40)] # G. C. Greubel, Jun 04 2019
    

Formula

G.f.: (1-x+4*x^2)/((1+x)*(1-x)^2*(1-2*x)).
a(n) = (2^(n+3) + (-1)^n - (4*n+7))/2.
a(n) = A000975(n) - 4*A011377(n-2).
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
E.g.f.: (8*exp(2*x) + exp(-x) - (4*x+7)*exp(x))/2. - G. C. Greubel, Jun 04 2019

A272144 Convolution of A000217 and A001045.

Original entry on oeis.org

0, 0, 1, 4, 12, 30, 69, 150, 316, 652, 1329, 2688, 5412, 10866, 21781, 43618, 87300, 174672, 349425, 698940, 1397980, 2796070, 5592261, 11184654, 22369452, 44739060, 89478289, 178956760, 357913716, 715827642, 1431655509, 2863311258, 5726622772
Offset: 0

Views

Author

Patrick Okolo Edeogu, Apr 21 2016

Keywords

Examples

			a(4) = 12 = 0*10+1*6+1*3+3*1+5*0 from A000217: 0,1,3,6,10,... and A001045: 0,1,1,3,5,11,...
		

Crossrefs

Partial Sums of A011377(n-2)=A178420(n-1).

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); [0,0] cat Coefficients(R!(x^2/((1-x)^3*(1+x)*(1-2*x)))); // G. C. Greubel, Oct 26 2018
  • Maple
    seq(coeff(series(x^2/((1-x)^3*(1+x)*(1-2*x)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    CoefficientList[Series[x^2/((1 - x)^3 (1 + x) (1 - 2 x)), {x, 0, 30}], x] (* Michael De Vlieger, Apr 21 2016 *)
  • PARI
    concat([0, 0], Vec(x^2/((1-x)^3*(1+x)*(1-2*x)) + O(x^40))) \\ Altug Alkan, Apr 21 2016
    

Formula

a(n) = Sum{k=0..n} A000217(k) * A001045(n-k). - Joerg Arndt, May 17 2016
a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 5*a(n-4) - 2*a(n-5).
G.f.: x^2/((1-x)^3*(1+x)*(1-2*x)).
a(n+2) = (-105+(-1)^n+2^(7+n)-48*n-6*n^2)/24. - Colin Barker, Apr 21 2016
E.g.f.: (exp(-x) + 32*exp(2*x) - 3*(11 + 10*x + 2*x^2)*exp(x))/24. - Ilya Gutkovskiy, Apr 21 2016

A320933 a(n) = 2^n - floor((n+3)/2).

Original entry on oeis.org

0, 0, 2, 5, 13, 28, 60, 123, 251, 506, 1018, 2041, 4089, 8184, 16376, 32759, 65527, 131062, 262134, 524277, 1048565, 2097140, 4194292, 8388595, 16777203, 33554418, 67108850, 134217713, 268435441, 536870896
Offset: 0

Views

Author

Paul Curtz, Oct 28 2018

Keywords

Comments

The sequence 0, 0, a(n) is an autosequence of the second kind. The difference table is:
0, 0, 0, 0, 2, 5, 13, ...
0, 0, 0, 2, 3, 8, 15, ...
0, 0, 2, 1, 5, 7, 17, ...
0, 2, -1, 4, 2, 10, 14, ...
2, -3, 5, -2, 8, 4, 20, ...
-5, 8, -7, 10, -4, 16, 8, ...
13, -15, 17, -14, 20, -8, 32, ...
etc.

Crossrefs

Programs

  • GAP
    List([0..40],n->2^n-Int((n+3)/2)); # Muniru A Asiru, Oct 28 2018
    
  • Magma
    [((-1)^n+2^(n+2)-2*n-5)/4: n in [0..40]]; // G. C. Greubel, Jun 04 2019
    
  • Maple
    seq(2^n-floor((n+3)/2),n=0..40); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    a[n_]:=2^n - Floor[(n+3)/2]; Array[a, 40, 0] (* or *) CoefficientList[ Series[x^2*(2-x)/((1-x)^2*(1-x-2*x^2)), {x, 0, 40}], x] (* Stefano Spezia, Oct 28 2018 *)
  • PARI
    concat([0,0], Vec(x^2*(2-x)/((1-x)^2*(1+x)*(1-2*x)) + O(x^40))) \\ Colin Barker, Oct 28 2018
    
  • Sage
    [((-1)^n+2^(n+2)-2*n-5)/4 for n in (0..40)] # G. C. Greubel, Jun 04 2019

Formula

a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + a(n-4).
a(n+1) = a(n) + A166920(n).
a(n+4) - a(n) = 13, 28, 58, 118, ... = 15*2^n - 2 = A060182(n+2).
With b(n) = 0, 0, 0, A011377(n) = 0, 0, 0, 1, 3, 8, 18, ..., then a(n) = 2*b(n+1) - b(n).
a(n+2) - 2*a(n+1) + a(n) = A014551(n).
G.f.: x^2*(2 - x)/((1-x)^2*(1 - x - 2*x^2)). - Stefano Spezia, Oct 28 2018
a(n) = ((-1)^n + 2^(n+2) - 2*n - 5) / 4. - Colin Barker, Oct 28 2018

Extensions

Three terms corrected by Colin Barker, Oct 28 2018

A091598 Triangle read by rows: T(n,0) = A078008(n), T(n,m) = T(n-1,m-1) + T(n-1,m).

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 2, 3, 2, 1, 6, 5, 5, 3, 1, 10, 11, 10, 8, 4, 1, 22, 21, 21, 18, 12, 5, 1, 42, 43, 42, 39, 30, 17, 6, 1, 86, 85, 85, 81, 69, 47, 23, 7, 1, 170, 171, 170, 166, 150, 116, 70, 30, 8, 1, 342, 341, 341, 336, 316, 266, 186, 100, 38, 9, 1, 682, 683, 682, 677, 652, 582, 452, 286, 138, 47, 10, 1
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

A Jacobsthal-Pascal triangle.

Examples

			Triangle starts as:
   1;
   0,  1;
   2,  1,  1;
   2,  3,  2,  1;
   6,  5,  5,  3,  1;
  10, 11, 10,  8,  4,  1;
  22, 21, 21, 18, 12,  5, 1;
  42, 43, 42, 39, 30, 17, 6, 1; ...
		

Crossrefs

Columns include A078008, A001045, A000975, A011377. Row sums give A084219.
Cf. A091597.

Programs

  • Mathematica
    T[n_, k_]:= If[k==0, (2^n + 2*(-1)^n)/3, If[k<0 || k>n, 0, T[n-1, k-1] + T[n-1, k]]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 04 2019 *)
  • PARI
    {T(n,k) = if(k==0, (2^n + 2*(-1)^n)/3, if(k<0 || k>n, 0, T(n-1,k-1) + T(n-1,k)))}; \\ G. C. Greubel, Jun 04 2019
    
  • Sage
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0): return (2^n + 2*(-1)^n)/3
        else: return T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jun 04 2019

Formula

k-th column has e.g.f. ((1-x)/(1-x-x^2))*(x/(1-x))^k.

A135086 Triangle, antidiagonals of an array formed by A000012 * A130321(transform).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 3, 6, 8, 1, 3, 7, 12, 16, 1, 3, 7, 14, 24, 32, 1, 3, 7, 15, 28, 48, 64, 1, 3, 7, 15, 30, 56, 96, 128, 1, 3, 7, 15, 31, 60, 112, 192, 256, 1, 3, 7, 15, 31, 62, 120, 224, 384, 512
Offset: 1

Views

Author

Gary W. Adamson, Nov 18 2007

Keywords

Comments

Row sums = A011377: (1, 3, 8, 18, 39, 81, 166, ...).

Examples

			First few rows of the array:
  1, 2, 4,  8, 16, 32, ...
  1, 3, 6, 12, 24, 48, ...
  1, 3, 7, 14, 28, 56, ...
  1, 3, 7, 15, 30, 60, ...
  1, 3, 7, 15, 31, 62, ...
  ...
First few rows of the triangle:
  1;
  1,  2;
  1,  3,  4;
  1,  3,  6,  8;
  1,  3,  7, 12, 16;
  1,  3,  7, 14, 24, 32;
  1,  3,  7, 15, 28, 48, 64;
  ...
		

Crossrefs

Formula

Triangle, antidiagonals of the array formed by A000012 * A130321.
Showing 1-10 of 11 results. Next