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

A177457 Triangle read by rows; union of A007318 and A112467.

Original entry on oeis.org

0, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 2, -1, 1, -1, 1, 1, 2, 3, 0, 3, -2, 1, -1, 1, 1, 3, 4, 2, 6, -2, 4, -3, 1, -1, 1, 1, 4, 5, 5, 10, 0, 10, -5, 5, -4, 1, -1, 1, 1, 5, 6, 9, 15, 5, 20, -5, 15, -9, 6, -5, 1, -1, 1, 1, 6, 7, 14, 21, 14, 35, 0, 35, -14, 21, -14, 7, -6, 1, -1, 1, 1, 7, 8, 20, 28
Offset: 1

Views

Author

Mark Dols, May 09 2010

Keywords

Examples

			Triangle begins:
                 0
              1  1 -1
           1  1  0  1 -1
        1  1  1  2 -1  1 -1
     1  1  2  3  0  3 -2  1 -1
  1  1  3  4  2  6 -2  4 -3  1 -1
		

Crossrefs

Programs

  • MATLAB
    function a = A177457( max_row )
        a = [0 1 1 -1];
        for n = 3:max_row
            r = [0 0 a(end-((n-2)*2):end) 0 0];
            a = [a r(1:end-2)+r(3:end)];
        end
    end % Thomas Scheuerle, Feb 02 2023

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k+1), for n > 2 and T(n, k) = 0 for negative k or k > 2*n-1. - Thomas Scheuerle, Feb 02 2023

Extensions

More terms from Thomas Scheuerle, Feb 02 2023

A133494 Diagonal of the array of iterated differences of A047848.

Original entry on oeis.org

1, 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429536481, 847288609443, 2541865828329, 7625597484987, 22876792454961, 68630377364883
Offset: 0

Views

Author

Paul Barry, Paul Curtz, Dec 23 2007

Keywords

Comments

a(n) is the number of ways to choose a composition C, and then choose a composition of each part of C. - Geoffrey Critzer, Mar 19 2012
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [1, 1, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
a(n) is the reptend length of 1/3^(n+1) in decimal. - Jianing Song, Nov 14 2018
Also the number of pairs of integer compositions, the first summing to n and the second with sum equal to the length of the first. If an integer composition is regarded as an arrow from sum to length, these are composable pairs, and the obvious composition operation founds a category of integer compositions. For example, we have (2,1,1,4) . (1,2,1) . (1,2) = (2,6), where dots represent the composition operation. The version without empty compositions is A000244. Composable triples are counted by 1 followed by A000302. The unordered version is A022811. - Gus Wiseman, Jul 14 2022

Examples

			From _Gus Wiseman_, Jul 15 2020: (Start)
The a(0) = 1 through a(3) = 9 ways to choose a composition of each part of a composition:
  ()  (1)  (2)      (3)
           (1,1)    (1,2)
           (1),(1)  (2,1)
                    (1,1,1)
                    (1),(2)
                    (2),(1)
                    (1),(1,1)
                    (1,1),(1)
                    (1),(1),(1)
(End)
		

Crossrefs

The strict version is A336139.
Splittings of partitions are A323583.
Multiset partitions of partitions are A001970.
Partitions of each part of a partition are A063834.
Compositions of each part of a partition are A075900.
Strict partitions of each part of a strict partition are A279785.
Compositions of each part of a strict partition are A304961.
Strict compositions of each part of a composition are A307068.
Compositions of each part of a strict composition are A336127.

Programs

Formula

Binomial transform of A078008. - Paul Curtz, Aug 04 2008
From R. J. Mathar, Nov 11 2008: (Start)
G.f.: (1 - 2*x)/(1 - 3*x).
a(n) = A000244(n-1), n > 0. (End)
From Philippe Deléham, Nov 13 2008: (Start)
a(n) = Sum_{k=0..n} A112467(n,k)*2^k.
a(n) = Sum_{k=0..n} A071919(n,k)*2^k. (End)
Let A(x) be the g.f. Then B(x) = x*A(x) satisfies B(x/(1-x)) = x/(1 - 2*B(x)). - Vladimir Kruchinin, Dec 05 2011
G.f.: 1/(1 - (Sum_{k>=1} (x/(1 - x))^k)). - Joerg Arndt, Sep 30 2012
For n > 0, a(n) = 2*(Sum_{k=0..n-1} a(k)) - 1 = 3^(n-1). - J. Conrad, Oct 29 2015
G.f.: 1 + x/(1 + x)*(1 + 4*x/(1 + 4*x)*(1 + 7*x/(1 + 7*x)*(1 + 10*x/(1 + 10*x)*(1 + .... - Peter Bala, May 27 2017
Invert transform of A011782(n) = 2^(n-1). Second invert transform of A000012. - Gus Wiseman, Jul 19 2020
a(n) = ceiling(3^(n-1)). - Alois P. Heinz, Jul 26 2020
From Elmo R. Oliveira, Mar 31 2025: (Start)
E.g.f.: (2 + exp(3*x))/3.
a(n) = 3*a(n-1) for n > 1. (End)

Extensions

Definition clarified by R. J. Mathar, Nov 11 2008

A214292 Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k), 0 < k < n with T(n,0) = n and T(n,n) = -n.

Original entry on oeis.org

0, 1, -1, 2, 0, -2, 3, 2, -2, -3, 4, 5, 0, -5, -4, 5, 9, 5, -5, -9, -5, 6, 14, 14, 0, -14, -14, -6, 7, 20, 28, 14, -14, -28, -20, -7, 8, 27, 48, 42, 0, -42, -48, -27, -8, 9, 35, 75, 90, 42, -42, -90, -75, -35, -9, 10, 44, 110, 165, 132, 0, -132, -165, -110, -44, -10
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 12 2012

Keywords

Examples

			The triangle begins:
    0:                              0
    1:                            1   -1
    2:                          2   0   -2
    3:                       3    2   -2   -3
    4:                     4    5   0   -5   -4
    5:                  5    9    5   -5   -9   -5
    6:                6   14   14   0  -14  -14   -6
    7:             7   20   28   14  -14  -28  -20   -7
    8:           8   27   48   42   0  -42  -48  -27   -8
    9:        9   35   75   90   42  -42  -90  -75  -35   -9
   10:     10   44  110  165  132   0 -132 -165 -110  -44  -10
   11:  11   54  154  275  297  132 -132 -297 -275 -154  -54  -11  .
		

Crossrefs

Programs

  • Haskell
    a214292 n k = a214292_tabl !! n !! k
    a214292_row n = a214292_tabl !! n
    a214292_tabl = map diff $ tail a007318_tabl
       where diff row = zipWith (-) (tail row) row
  • Mathematica
    row[n_] := Table[Binomial[n, k], {k, 0, n}] // Differences;
    T[n_, k_] := row[n + 1][[k + 1]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 31 2018 *)

Formula

T(n,k) = A007318(n+1,k+1) - A007318(n+1,k), 0<=k<=n, i.e. first differences of rows in Pascal's triangle;
T(n,k) = -T(n,k);
row sums and central terms equal 0, cf. A000004;
sum of positive elements of n-th row = A014495(n+1);
T(n,0) = n;
T(n,1) = A000096(n-2) for n > 1; T(n,1) = - A080956(n) for n > 0;
T(n,2) = A005586(n-4) for n > 3; T(n,2) = A129936(n-2);
T(n,3) = A005587(n-6) for n > 5;
T(n,4) = A005557(n-9) for n > 8;
T(n,5) = A064059(n-11) for n > 10;
T(n,6) = A064061(n-13) for n > 12;
T(n,7) = A124087(n) for n > 14;
T(n,8) = A124088(n) for n > 16;
T(2*n+1,n) = T(2*n+2,n) = A000108(n+1), Catalan numbers;
T(2*n+3,n) = A000245(n+2);
T(2*n+4,n) = A002057(n+1);
T(2*n+5,n) = A000344(n+3);
T(2*n+6,n) = A003517(n+3);
T(2*n+7,n) = A000588(n+4);
T(2*n+8,n) = A003518(n+4);
T(2*n+9,n) = A001392(n+5);
T(2*n+10,n) = A003519(n+5);
T(2*n+11,n) = A000589(n+6);
T(2*n+12,n) = A090749(n+6);
T(2*n+13,n) = A000590(n+7).

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

A008482 Coefficients in expansion of (x-1)*(1+x)^(n-1), n > 0.

Original entry on oeis.org

0, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -2, 0, 2, 1, -1, -3, -2, 2, 3, 1, -1, -4, -5, 0, 5, 4, 1, -1, -5, -9, -5, 5, 9, 5, 1, -1, -6, -14, -14, 0, 14, 14, 6, 1, -1, -7, -20, -28, -14, 14, 28, 20, 7, 1, -1, -8, -27, -48, -42, 0, 42, 48, 27, 8, 1, -1, -9, -35, -75, -90, -42, 42
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term, same as A112467. - Philippe Deléham, Nov 07 2006
From Christopher Simoni, Feb 11 2019: (Start)
Along the diagonal containing all the natural numbers, where every number is at point T(n,n-1), T(n,k)^2 can be found by adding T(n+1,k), T(n,k-1), T(n-1,k), and T(n,k+1) together. Empirical observation.
Along the diagonal containing all the natural numbers, where every number is at point T(n,n-1), T(n,k)^3 can by found. The following products are added together: T(n-1,k-1)*T(n,k+1)*T(n+1,k); T(n-1,k)*T(n+1,k+1)*(n,k-1); and 3*T(n,k). Empirical observation. (End)

Examples

			Triangle begins:
   0
  -1   1
  -1   0   1
  -1  -1   1    1
  -1  -2   0    2    1
  -1  -3  -2    2    3    1
  -1  -4  -5    0    5    4   1
  -1  -5  -9   -5    5    9   5   1
  -1  -6 -14  -14    0   14  14   6   1
  -1  -7 -20  -28  -14   14  28  20   7   1
  -1  -8 -27  -48  -42    0  42  48  27   8   1
  -1  -9 -35  -75  -90  -42  42  90  75  35   9   1
  -1 -10 -44 -110 -165 -132   0 132 165 110  44  10   1
... - _Philippe Deléham_, Nov 29 2013
		

References

  • A. A. Kirillov, Variations on the triangular theme, Amer. Math. Soc. Transl., (2), Vol. 169, 1995, pp. 43-73, see p. 71.

Crossrefs

Skew analog of Pascal's triangle A007318, central column gives Catalan numbers A000108, essentially same as A037012, except rows are read from left to right (A037012 = - this sequence).
The positive half of this triangle is A008315. - Michael Somos

Programs

  • Mathematica
    Table[Binomial[n-1, k-1] -Binomial[n-1, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 11 2019 *)
  • PARI
    {T(n, k) = if( n<1, 0, polcoeff( (x-1) * (1+x)^(n-1), k))}; /* Michael Somos, Oct 04 1999 */
    
  • PARI
    A008482(n,k)={if(k>=n-k, if(k>n-k,-A008482(n,n-k),0), k>2, A008482(n-1,k-1)+A008482(n-1,k), k>1, 1-(n-2)*(n-3)\2, k, 2-n, -1)} \\ M. F. Hasler, Feb 11 2019
    
  • Sage
    [0] + flatten([[binomial(n-1, k-1) -binomial(n-1, k) for k in (0..n)] for n in (1..12)]) # G. C. Greubel, Feb 11 2019

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k); T(0, 0) = 0, T(1, 0) = -1, T(1, 1) = 1. - Michael Somos, Oct 04 1999
T(n, k) = binomial(n, k-1) - binomial(n, k). - Michael Somos, Oct 04 1999
T(2n+1,n+1) = A000108(n), Catalan numbers. - Philippe Deléham, Nov 29 2013
a(n) = -A037012(n). - Michael Somos, May 24 2015
T(n, k) = -T(n, n - k); T(n, n) = 1 except for n = 0; T(n+1, n) = n-1; T(n+2, n) = A000217(n-1) - 1. This proves the observations by C. Simoni, e.g., T(n+1,n)^2 - 1 = T(n+1,n-1) + T(n+2,n) + 1. - M. F. Hasler, Feb 11 2019

A274709 A statistic on orbital systems over n sectors: the number of orbitals which rise to maximum height k over the central circle.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 2, 3, 1, 10, 15, 5, 5, 9, 5, 1, 35, 63, 35, 7, 14, 28, 20, 7, 1, 126, 252, 180, 63, 9, 42, 90, 75, 35, 9, 1, 462, 990, 825, 385, 99, 11, 132, 297, 275, 154, 54, 11, 1, 1716, 3861, 3575, 2002, 702, 143, 13, 429, 1001, 1001, 637, 273, 77, 13, 1
Offset: 0

Views

Author

Peter Luschny, Jul 09 2016

Keywords

Comments

The definition of an orbital system is given in A232500 (see also the illustration there). The number of orbitals over n sectors is counted by the swinging factorial A056040.
Note that (sum row_n) / row_n(0) = 1,1,2,2,3,3,4,4,..., i.e. the swinging factorials are multiples of the extended Catalan numbers A057977 generalizing the fact that the central binomials are multiples of the Catalan numbers.
T(n, k) is a subtriangle of the extended Catalan triangle A189231.

Examples

			Triangle read by rows, n>=0. The length of row n is floor((n+2)/2).
[ n] [k=0,1,2,...] [row sum]
[ 0] [  1] 1
[ 1] [  1] 1
[ 2] [  1,   1] 2
[ 3] [  3,   3] 6
[ 4] [  2,   3,   1] 6
[ 5] [ 10,  15,   5] 30
[ 6] [  5,   9,   5,   1] 20
[ 7] [ 35,  63,  35,   7] 140
[ 8] [ 14,  28,  20,   7,  1] 70
[ 9] [126, 252, 180,  63,  9] 630
[10] [ 42,  90,  75,  35,  9,  1] 252
[11] [462, 990, 825, 385, 99, 11] 2772
[12] [132, 297, 275, 154, 54, 11, 1] 924
T(6, 2) = 5 because the five orbitals [-1, 1, 1, 1, -1, -1], [1, -1, 1, 1, -1, -1], [1, 1, -1, -1, -1, 1], [1, 1, -1, -1, 1, -1], [1, 1, -1, 1, -1, -1] raise to maximal height of 2 over the central circle.
		

Crossrefs

Cf. A008313, A039599 (even rows), A047072, A056040 (row sums), A057977 (col 0), A063549 (col 0), A112467, A120730, A189230 (odd rows aerated), A189231, A232500.
Other orbital statistics: A241477 (first zero crossing), A274706 (absolute integral), A274708 (number of peaks), A274710 (number of turns), A274878 (span), A274879 (returns), A274880 (restarts), A274881 (ascent).

Programs

  • Maple
    S := proc(n,k) option remember; `if`(k>n or k<0, 0, `if`(n=k, 1, S(n-1,k-1)+
    modp(n-k,2)*S(n-1,k)+S(n-1,k+1))) end: T := (n,k) -> S(n,2*k);
    seq(print(seq(T(n,k), k=0..iquo(n,2))), n=0..12);
  • Sage
    from itertools import accumulate
    # Brute force counting
    def unit_orbitals(n):
        sym_range = [i for i in range(-n+1, n, 2)]
        for c in Combinations(sym_range, n):
            P = Permutations([sgn(v) for v in c])
            for p in P: yield p
    def max_orbitals(n):
        if n == 0: return [1]
        S = [0]*((n+2)//2)
        for u in unit_orbitals(n):
            L = list(accumulate(u))
            S[max(L)] += 1
        return S
    for n in (0..10): print(max_orbitals(n))

A349812 Triangle read by rows: row 1 is [1]; for n >= 1, row n gives coefficients of expansion of (-1/x + x)*(1/x + 1 + x)^(n-1) in order of increasing powers of x.

Original entry on oeis.org

1, -1, 0, 1, -1, -1, 0, 1, 1, -1, -2, -2, 0, 2, 2, 1, -1, -3, -5, -4, 0, 4, 5, 3, 1, -1, -4, -9, -12, -9, 0, 9, 12, 9, 4, 1, -1, -5, -14, -25, -30, -21, 0, 21, 30, 25, 14, 5, 1, -1, -6, -20, -44, -69, -76, -51, 0, 51, 76, 69, 44, 20, 6, 1, -1, -7, -27, -70, -133, -189, -196, -127, 0, 127, 196, 189, 133, 70, 27, 7, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 23 2021

Keywords

Comments

The rule for constructing this triangle (ignoring row 0) is the same as that for A027907: each number is the sum of the three numbers immediately above it in the previous row. Here row 1 is [-1, 0, 1] instead of [1, 1, 1].

Examples

			Triangle begins:
   1;
  -1,  0,   1;
  -1, -1,   0,   1,    1;
  -1, -2,  -2,   0,    2,    2,    1;
  -1, -3,  -5,  -4,    0,    4,    5,    3,  1;
  -1, -4,  -9, -12,   -9,    0,    9,   12,  9,   4,   1;
  -1, -5, -14, -25,  -30,  -21,    0,   21, 30,  25,  14,   5,   1;
  -1, -6, -20, -44,  -69,  -76,  -51,    0, 51,  76,  69,  44,  20,  6,  1;
  -1, -7, -27, -70, -133, -189, -196, -127,  0, 127, 196, 189, 133, 70, 27, 7, 1;
  ...
		

Crossrefs

The left half of the triangle is A026300, the right half is A064189 (or A122896). The central (nonzero) column gives the Motzkin numbers A001006.

Programs

  • Maple
    t1:=-1/x+x; m:=1/x+1+x;
    lprint([1]);
    for n from 1 to 12 do
    w1:=expand(t1*m^(n-1));
    w3:=expand(x^n*w1);
    w4:=series(w3,x,2*n+1);
    w5:=seriestolist(w4);
    lprint(w5);
    od:

A174296 Row sums of A174294.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2
Offset: 0

Views

Author

Mats Granvik, Mar 15 2010

Keywords

Crossrefs

Programs

  • Magma
    [n lt 2 select (n+1) else 2 + (n mod 2): n in [0..110]]; // G. C. Greubel, Nov 25 2021
    
  • Mathematica
    Table[If[n<2, n+1, (5-(-1)^n)/2], {n,0,110}] (* G. C. Greubel, Nov 25 2021 *)
  • Sage
    [1,2]+[(5-(-1)^n)/2 for n in (2..110)] # G. C. Greubel, Nov 25 2021

Formula

a(A004280(n)) = 3 for n > 2.
From G. C. Greubel, Nov 25 2021: (Start)
a(n) = a(n-2) for n > 3, with a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3.
a(n) = (5 - (-1)^n)/2 for n > 1, with a(0) = 1, a(1) = 2.
a(n) = (n+1)*[n<2] + A010693(n)*[n>1].
G.f.: (1_+ 2*x + x^2 + x^3)/(1 - x^2).
E.g.f.: (1/2)*( -exp(-x) - 2*(1+x) + 5*exp(x) ). (End)

A230206 Trapezoid of dot products of row 3 (signs alternating) with sequential 4-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 4-tuples (C(3,0), -C(3,1), C(3,2), -C(3,3)) and (C(n-1,k-3), C(n-1,k-2), C(n-1,k-1), C(n-1,k)), n >= 1, 0 <= k <= n+2.

Original entry on oeis.org

-1, 3, -3, 1, -1, 2, 0, -2, 1, -1, 1, 2, -2, -1, 1, -1, 0, 3, 0, -3, 0, 1, -1, -1, 3, 3, -3, -3, 1, 1, -1, -2, 2, 6, 0, -6, -2, 2, 1, -1, -3, 0, 8, 6, -6, -8, 0, 3, 1, -1, -4, -3, 8, 14, 0, -14, -8, 3, 4, 1, -1, -5, -7, 5, 22, 14, -14, -22, -5, 7
Offset: 1

Views

Author

Dixon J. Jones, Oct 11 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^3 (x+1)^(n-1) for n > 0.

Examples

			Trapezoid begins
  -1,  3, -3,  1;
  -1,  2,  0, -2,  1;
  -1,  1,  2, -2, -1,  1;
  -1,  0,  3,  0, -3,  0,  1;
  -1, -1,  3,  3, -3, -3,  1, 1;
  -1, -2,  2,  6,  0, -6, -2, 2, 1;
  -1, -3,  0,  8,  6, -6, -8, 0, 3, 1;
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230207-A230212 (j=4 to j=9).

Programs

  • Magma
    m:=3; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 29 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^3 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=3; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 29 2018 *)
  • PARI
    m=3; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 29 2018
    
  • Sage
    m=3; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 29 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=3.

A230212 Trapezoid of dot products of row 9 (signs alternating) with sequential 10-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 10-tuples (C(9,0), -C(9,1), ..., C(9,8), -C(9,9)) and (C(n-1,k-9), C(n-1,k-8), ..., C(n-1,k)), n >= 1, 0 <= k <= n+8.

Original entry on oeis.org

-1, 9, -36, 84, -126, 126, -84, 36, -9, 1, -1, 8, -27, 48, -42, 0, 42, -48, 27, -8, 1, -1, 7, -19, 21, 6, -42, 42, -6, -21, 19, -7, 1, -1, 6, -12, 2, 27, -36, 0, 36, -27, -2, 12, -6, 1, -1, 5, -6, -10, 29, -9, -36, 36, 9, -29, 10, 6, -5, 1, -1, 4, -1, -16
Offset: 1

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^9 (x+1)^(n-1), n > 0.

Examples

			Trapezoid begins:
  -1, 9, -36,  84, -126, 126, -84,  36,  -9,   1;
  -1, 8, -27,  48,  -42,   0,  42, -48,  27,  -8,   1;
  -1, 7, -19,  21,    6, -42,  42,  -6, -21,  19,  -7,  1;
  -1, 6, -12,   2,   27, -36,   0,  36, -27,  -2,  12, -6,  1;
  -1, 5,  -6, -10,   29,  -9, -36,  36,   9, -29,  10,  6, -5,  1;
  -1, 4,  -1, -16,   19,  20, -45,   0,  45, -20, -19, 16,  1, -4,  1;
  -1, 3,   3, -17,    3,  39, -25, -45,  45,  25, -39, -3, 17, -3, -3, 1;
  etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206-A230211 (j=3 to j=8).

Programs

  • Magma
    m:=9; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 28 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^9 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=9; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 28 2018 *)
  • PARI
    m=9; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 28 2018
    
  • Sage
    m=9; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 28 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n>=1, with T(n,0) = (-1)^m and m=9.
Showing 1-10 of 23 results. Next