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.

Previous Showing 11-20 of 84 results. Next

A167374 Triangle, read by rows, given by [ -1,1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, -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, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 02 2009

Keywords

Comments

Riordan array (1-x,1) read by rows; Riordan inverse is (1/(1-x),1). Columns have g.f. (1-x)x^k. Diagonal sums are A033999. Unsigned version in A097806.
Table T(n,k) read by antidiagonals. T(n,1) = 1, T(n,2) = -1, T(n,k) = 0, k > 2. - Boris Putievskiy, Jan 17 2013
Finite difference operator (pair difference): left multiplication by T of a sequence arranged as a column vector gives a running forward difference, a(k+1)-a(k), or first finite difference (modulo sign), of the elements of the sequence. T^n gives the n-th finite difference (mod sign). T is the inverse of the summation matrix A000012 (regarded as lower triangular matrices). - Tom Copeland, Mar 26 2014

Examples

			Triangle begins:
   1;
  -1,  1;
   0, -1,  1;
   0,  0, -1,  1;
   0,  0,  0, -1,  1;
   0,  0,  0,  0, -1,  1; ...
Row number r (r>4) contains (r-2) times '0', then '-1' and '1'.
From _Boris Putievskiy_, Jan 17 2013: (Start)
The start of the sequence as a table:
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  1  -1  0  0  0  0  0 ...
  ...
(End)
		

Crossrefs

Programs

  • Maple
    A167374 := proc(n,k)
        if k> n or k < n-1 then
            0;
        elif k = n then
            1;
        else
            -1 ;
        end if;
    end proc: # R. J. Mathar, Sep 07 2016
  • Mathematica
    Table[PadLeft[{-1, 1}, n], {n, 13}] // Flatten (* or *)
    MapIndexed[Take[#1, First@ #2] &, CoefficientList[Series[(1 - x)/(1 - x y), {x, 0, 12}], {x, y}]] // Flatten (* Michael De Vlieger, Nov 16 2016 *)
    T[n_, k_] := If[ k<0 || k>n, 0, Boole[n==k] - Boole[n==k+1]]; (* Michael Somos, Oct 01 2022 *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, (n==k) - (n==k+1))}; /* Michael Somos, Oct 01 2022 */

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A011782(n), A025192(n), A002001(n), A005054(n), A052934(n), A055272(n), A055274(n), A055275(n), A055268(n), A055276(n) for x = 1,2,3,4,5,6,7,8,9,10,11 respectively .
From Boris Putievskiy, Jan 17 2013: (Start)
a(n) = floor((A002260(n)+2)/(A003056(n)+2))*(-1)^(A002260(n)+A003056(n)+1), n>0.
a(n) = floor((i+2)/(t+2))*(-1)^(i+t+1), n > 0, where
i = n - t*(t+1)/2,
t = floor((-1 + sqrt(8*n-7))/2). (End)
T*A000012 = Identity matrix. T*A007318 = A097805. T*(A007318)^(-1)= signed A029653. - Tom Copeland, Mar 26 2014
G.f.: (1-x)/(1-x*y). - R. J. Mathar, Aug 11 2015
T = A130595*A156644 = M*T^(-1)*M = M*A000012*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016

A035002 Square array read by antidiagonals: T(m,n) = Sum_{k=1..m-1} T(m-k,n) + Sum_{k=1..n-1} T(m,n-k).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 5, 5, 4, 8, 12, 14, 12, 8, 16, 28, 37, 37, 28, 16, 32, 64, 94, 106, 94, 64, 32, 64, 144, 232, 289, 289, 232, 144, 64, 128, 320, 560, 760, 838, 760, 560, 320, 128, 256, 704, 1328, 1944, 2329, 2329, 1944, 1328, 704, 256, 512, 1536, 3104, 4864, 6266
Offset: 1

Views

Author

Keywords

Comments

T(m,n) is the sum of all the entries above it plus the sum of all the entries to the left of it.
T(m,n) equals the number of ways to move a chess rook from the lower left corner to square (m,n), with the rook moving only up or right. - Francisco Santos, Oct 20 2005
T(m+1,n+1) is the number of nim games that start with two piles of stones of sizes m and n. - Martin J. Erickson (erickson(AT)truman.edu), Dec 05 2008
The same sequences arises from reading the following triangle by rows: Start with 1, then use a Pascal-like rule, where each new entry is the sum of all terms in the two diagonals that converge at that point. See example below. - J. M. Bergot, Jun 08 2013
T(n,k) is odd iff (n,k) = (1,1), k = n-1, or k = n+1. - Peter Kagey, Apr 20 2020

Examples

			Table begins:
  1  1  2   4   8  16   32   64 ...
  1  2  5  12  28  64  144  320 ...
  2  5 14  37  94 232  560 1328 ...
  4 12 37 106 289 760 1944 4864 ...
Alternative construction as a triangle:
               1
             1   1
           2   2   2
         4   5   5   4
       8  12  14  12   8
    16  28  37  37  28  16
		

Crossrefs

Cf. A035001, A051708, A025192 (antidiagonal sums).

Programs

  • Maple
    A035002 := proc(m,n)
        option remember;
        if n = 1 and m= 1 then
            1;
        elif m = 1 then
            2^(n-2) ;
        elif n = 1 then
            2^(m-2) ;
        else
            add( procname(m-k,n),k=1..m-1) + add( procname(m,n-k),k=1..n-1) ;
        end if;
    end proc: # R. J. Mathar, Jun 06 2013
  • Mathematica
    T[n_, 1] = 2^(n-2); T[1, n_] = 2^(n-2); T[1, 1] = 1; T[m_, n_] := T[m, n] = Sum[T[m-k, n], {k, 1, m-1}] + Sum[T[m, n-k], {k, 1, n-1}]; Flatten[Table[T[m-n+1 , n], {m, 1, 11}, {n, 1, m}]] (* Jean-François Alcover, Nov 04 2011 *)
    nMax = 11; T = (((x - 1)*y - x + 1)/((3*x - 2)*y - 2*x + 1) + O[x]^nMax // Normal // Expand) + O[y]^nMax // Normal // Expand // CoefficientList[#, {x, y}]&; Table[T[[n - k + 1, k]], {n, 1, nMax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 18 2018, after Vladimir Kruchinin *)
    T[ n_, m_] := SeriesCoefficient[ (1 - x)*(1 - y)/( 1 - 2*x - 2*y + 3*x*y), {x, 0, n}, {y, 0, m}]; (* Michael Somos, Oct 05 2023 *)
  • Maxima
    T(n,m):=sum(binomial(m-1,m-i)*sum(binomial(k+i,i)*binomial(n-1,n-k),k,0,n),i,0,m); /* Vladimir Kruchinin, Apr 14 2015 */

Formula

G.f. T(n; x) for n-th row satisfies: T(n; x) = Sum_{k=1..n} (1+x^k)*T(n-k; x), T(0; x) = 1. - Vladeta Jovovic, Sep 03 2002
T(m+1,n+1) = 2*T(m+1,n) + 2*T(m,n+1) - 3*T(m,n); T(n,1) = T(1,n) = A011782(n). - Francisco Santos, Oct 20 2005
G.f.: ((x-1)*y-x+1)/((3*x-2)*y-2*x+1). - Vladimir Kruchinin, Apr 14 2015
T(n,m) = Sum_{i=0..m} C(m-1,m-i)*Sum_{k=0..n} C(k+i,i)*C(n-1,n-k). - Vladimir Kruchinin, Apr 14 2015
T(n,m) = T(m,n) for all n and m. - Michael Somos, Oct 04 2023
T(n,2) = (n+2)*2^(n-3) for n>1; T(n,3) = (n^2+11*n+14)*2^(n-5) for n>1 - Erich Friedman, Jan 14 2025

A118800 Triangle read by rows: T satisfies the matrix products: C*T*C = T^-1 and T*C*T = C^-1, where C is Pascal's triangle.

Original entry on oeis.org

1, 1, -1, 2, -3, 1, 4, -8, 5, -1, 8, -20, 18, -7, 1, 16, -48, 56, -32, 9, -1, 32, -112, 160, -120, 50, -11, 1, 64, -256, 432, -400, 220, -72, 13, -1, 128, -576, 1120, -1232, 840, -364, 98, -15, 1, 256, -1280, 2816, -3584, 2912, -1568, 560, -128, 17, -1, 512, -2816, 6912, -9984, 9408, -6048, 2688, -816, 162, -19, 1
Offset: 0

Views

Author

Paul D. Hanna, May 02 2006

Keywords

Comments

The matrix square, T^2, consists of columns that are all the same.
Matrix inverse is triangle A118801. Row sums form {0^n, n>=0}.
Unsigned row sums equal A025192(n) = 2*3^(n-1), n>=1.
Row squared sums equal A051708.
Antidiagonal sums equals all 1's.
Unsigned antidiagonal sums form A078057 (with offset).
Antidiagonal squared sums form A002002(n) = Sum_{k=0..n-1} C(n,k+1)*C(n+k,k), n>=1.
From Paul Barry, Nov 10 2008: (Start)
T is [1,1,0,0,0,...] DELTA [ -1,0,0,0,0,...] or C(1,n) DELTA -C(0,n). (DELTA defined in A084938).
The positive matrix T_p is [1,1,0,0,0,...] DELTA [1,0,0,0,0,...]. T_p*C^-1 is
[0,1,0,0,0,....] DELTA [1,0,0,0,0,...] which is C(n-1,k-1) for n,k>=1. (End)
The triangle formed by deleting the minus signs is the mirror of the self-fusion of Pascal's triangle; see Comments at A081277 and A193722. - Clark Kimberling, Aug 04 2011
Riordan array ( (1 - x)/(1 - 2*x), -x/(1 - 2*x) ). Cf. A209149. The matrix square is the Riordan array ( (1 - x)^2/(1 - 2*x), x ), which belongs to the Appell subgroup of the Riordan group. See the Example section below. - Peter Bala, Jul 17 2013
From Peter Bala, Feb 23 2019: (Start)
There is a 1-parameter family of solutions to the simultaneous equations C*T*C = T^-1 and T*C*T = C^-1, where C is Pascal's triangle. Let T(k) denote the Riordan array ( (1 - k*x)/(1 - (k + 1)*x), -x/(1 - (k + 1)*x) ) so that T(1) = T. Then C*T(k)*C = T(k)^-1 and T(k)*C*T(k) = C^-1, for arbitrary k. For arbitrary m, the Riordan arrays (T(k)*C^m)^2 and (C^m*T(k))^2 both belong to the Appell subgroup of the Riordan group.
More generally, given a fixed m, we can ask for a lower triangular array X solving the simultaneous equations (C^m)*X*(C^m) = X^-1 and X*(C^m)*X = C^(-m). A 1-parameter family of solutions is given by the Riordan arrays X = ( (1 - m*k*x)/(1 - m*(k + 1)*x), -x/(1 - m*(k + 1)*x) ). The Riordan arrays X^2 , (X*C^n)^2 and (C^n*X)^2, for arbitrary n, all belong to the Appell subgroup of the Riordan group. (End)

Examples

			Triangle begins:
     1;
     1,    -1;
     2,    -3,     1;
     4,    -8,     5,     -1;
     8,   -20,    18,     -7,     1;
    16,   -48,    56,    -32,     9,     -1;
    32,  -112,   160,   -120,    50,    -11,     1;
    64,  -256,   432,   -400,   220,    -72,    13,    -1;
   128,  -576,  1120,  -1232,   840,   -364,    98,   -15,    1;
   256, -1280,  2816,  -3584,  2912,  -1568,   560,  -128,   17,   -1;
   512, -2816,  6912,  -9984,  9408,  -6048,  2688,  -816,  162,  -19,  1;
  1024, -6144, 16640, -26880, 28800, -21504, 11424, -4320, 1140, -200, 21, -1;
  ...
The matrix square, T^2, equals:
   1;
   0,  1;
   1,  0,  1;
   2,  1,  0,  1;
   4,  2,  1,  0,  1;
   8,  4,  2,  1,  0,  1;
  16,  8,  4,  2,  1,  0,  1;
  32, 16,  8,  4,  2,  1,  0,  1;
  64, 32, 16,  8,  4,  2,  1,  0,  1; ...
where all columns are the same.
		

Crossrefs

Cf. A118801 (inverse), A025192 (unsigned row sums), A051708 (row squared sums), A078057 (unsigned antidiagonal sums), A002002 (antidiagonal squared sums).

Programs

  • Mathematica
    (* This program generates A118800 as the mirror of the self-fusion of Pascal's triangle. *)
    z = 8; a = 1; b = 1; c = 1; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n;
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, 0];
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, _] = 1;
    g[n_] := CoefficientList[w[n, -x], x];
    TableForm[Table[Reverse[Abs@g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[Abs@g[n]], {n, -1, z}]] (* A081277 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]] (* A118800 *)
    (* Clark Kimberling, Aug 04 2011 *)
    T[ n_, k_] := If[ n<0 || k<0, 0, (-1)^k 2^(n-k) (Binomial[ n, k] + Binomial[ n-1, n-k]) / 2]; (* Michael Somos, Nov 25 2016 *)
  • PARI
    {T(n,k)=if(n==0&k==0,1,(-1)^k*2^(n-k)*(binomial(n,k)+binomial(n-1,k-1))/2)}
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • PARI
    /* Chebyshev Polynomials as Antidiagonals: */
    {T(n,k)=local(Ox=x*O(x^(2*k))); polcoeff(((1+sqrt(1-x^2+Ox))^(n+k)+(1-sqrt(1-x^2+Ox))^(n+k))/2,2*k,x)}
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • Sage
    # uses[riordan_square from A321620]
    # Computes the unsigned triangle.
    riordan_square((1-x)/(1-2*x), 8) # Peter Luschny, Jan 03 2019

Formula

T(n,k) = (-1)^k * 2^(n-k) * ( C(n,k) + C(n-1,k-1) )/2 for n>=k>=0 with T(0,0) = 1. Antidiagonals form the coefficients of Chebyshev polynomials: T(n,k) = [x^(2*n)] [(1+sqrt(1-x^2))^(n+k) + (1-sqrt(1-x^2))^(n+k)]/2.
Rows of the triangle are generated by taking successive iterates of (A135387)^n * [1, 1, 0, 0, 0, ...]. - Gary W. Adamson, Dec 09 2007
O.g.f.: (1 - t)/(1 + t*(x - 2)) = 1 + (1 - x)*t + (2 - 3*x + x^2)^t^2 + (4 - 8*x + 5*x^2 - x^3)*t^3 + .... Row polynomial R(n,x) = (1 - x)*(2 - x)^(n-1) for n >= 1. - Peter Bala, Jul 17 2013
T(n,k)=2*T(n-1,k)-T(n-1,k-1) with 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 25 2013
G.f. for row n (n>=1): Sum_{k=0..n} T(n,k)*x^k = (1-x)*(2-x)^(n-1). - Philippe Deléham, Nov 25 2013
From Tom Copeland, Nov 15 2016: (Start)
E.g.f. is [1 + (1-x)e^((2-x)t)]/(2-x), so the row polynomials are p_n(x) = (1-q,(x))^n, umbrally, where (q.(x))^k = q_k(x) are the row polynomials of A239473, or, equivalently, T = M*A239473, where M is the inverse Pascal matrix C^(-1) = A130595 with the odd rows negated, i.e., M(n,k) = (-1)^n C^(-1)(n,k) with e.g.f. exp[(1-x)t]. Cf. A200139: A200139(n,k) = (-1)^k* A118800(n,k).
TCT = C^(-1) = A130595 and A239473 = A000012*C^(-1) = S*C^(-1) imply (M*S)^2 = Identity matrix, i.e., M*S = (M*S)^(-1) = S^(-1)*M^(-1) = A167374*M^(-1). Note that M = M^(-1). Cf. A097805. (End)

A078099 Array T(m,n) read by antidiagonals: T(m,n) = number of ways of 3-coloring an m X n grid (m >= 1, n >= 1).

Original entry on oeis.org

1, 2, 2, 4, 6, 4, 8, 18, 18, 8, 16, 54, 82, 54, 16, 32, 162, 374, 374, 162, 32, 64, 486, 1706, 2604, 1706, 486, 64, 128, 1458, 7782, 18150, 18150, 7782, 1458, 128, 256, 4374, 35498, 126534, 193662, 126534, 35498, 4374, 256, 512, 13122, 161926, 882180, 2068146, 2068146, 882180, 161926, 13122, 512
Offset: 1

Views

Author

N. J. A. Sloane, Dec 05 2002

Keywords

Comments

We assume the top left point gets color 1 (or, in other words, take the total number of colorings and divide by 3). The rule for coloring is that horizontally or vertically adjacent points must have different colors. - N. J. A. Sloane, Feb 12 2013
Equals half the number of m X n binary matrices with no 2 X 2 circuit having the pattern 0011 in any orientation. - R. H. Hardin, Oct 06 2010
Also the number of Miura-ori foldings [Ginepro-Hull]. - N. J. A. Sloane, Aug 05 2015

Examples

			Array begins:
1       2       4       8       16      32      64      128     256     512 ...
2       6       18      54      162     486     1458    4374    13122 ...
4       18      82      374     1706    7782    35498   161926 ...
8       54      374     2604    18150   126534  882180 ...
16      162     1706    18150   193662 ...
32      486     7782    126534 ...
For the 1 X n case: the first point gets color 1, thereafter there are 2 choices for each color, so T(1,n) = 2^(n-1).
For the 2 X 2 case, the colorings are
12 12 12 13 13 13
21 23 31 31 32 21
		

References

  • Thomas C. Hull, Coloring Connections with Counting Mountain-Valley Assignments in (book) Origami^6: I. Mathematics, 2015, ed. Koryo Miura, Toshikazu Kawasaki, Tomohiro Tachi, Ryuhei Uehara, Robert J. Lang, Patsy Wang-Iverson, American Mathematical Soc., Dec 18, 2015, 368 pages
  • Michael S. Paterson (Warwick), personal communication.

Crossrefs

Cf. A207997, A020698, A078100. Main diagonal is A068253. Other diagonals produce A078101 and A078102.
Cf. A222444 (4 colorings), A222144 (5 colorings), A222281 (6 colorings), A222340 (7 colorings), A222462 (8 colorings).

Programs

  • Maple
    with(linalg); t := transpose; M[1] := matrix(1,1,[1]); Z[1] := matrix(1,1,0); W[1] := evalm(M[1]+t(M[1])); v[1] := matrix(1,1,1);
    for n from 2 to 6 do t1 := stackmatrix(M[n-1],Z[n-1]); t2 := stackmatrix(t(M[n-1]),M[n-1]); M[n] := t(stackmatrix(t(t1),t(t2))); Z[n] := matrix(2^(n-1),2^(n-1),0); W[n] := evalm(M[n]+t(M[n])); v[n] := matrix(1,2^(n-1),1); od:
    T := proc(m,n) evalm( v[m] &* W[m]^(n-1) &* t(v[m]) ); end;
  • Mathematica
    mmax = 10; M[1] = {{1}}; M[m_] := M[m] = {{M[m-1], Transpose[M[m-1]]}, {Array[0&, {2^(m-2), 2^(m-2)}], M[m-1]}} // ArrayFlatten; W[m_] := M[m] + Transpose[M[m]]; T[m_, 1] := 2^(m-1); T[1, n_] := 2^(n-1); T[m_, n_] := MatrixPower[W[m], n-1] // Flatten // Total; Table[T[m-n+1, n], {m, 1, mmax}, {n, 1, m}] // Flatten (* Jean-François Alcover, Feb 13 2016 *)

Formula

Let M[1] = [1], M[m+1] = the block matrix [ [ M[m], M[m]' ], [ 0, M[m] ] ], W[m] = M[m] + M[m]', then T(m, n) = sum of entries of W[m]^(n-1) (the prime denotes transpose).
T(3,n) = A052913(n). T(4,n) = 2*A078100(n).
T(n,m) = T(m,n). T(1,n)= A000079(n-1). T(2,n)=A025192(n). T(5,n) = 2*A207994(n). T(6,n) = 2*A207995(n). - R. J. Mathar, Nov 23 2015

Extensions

More terms from Alois P. Heinz, Mar 23 2009

A216216 Square array T, read by antidiagonals: T(n,k) = 0 if n-k>=3 or if k-n>=3, T(2,0) = T(1,0) = T(0,0) = T(0,1) = T(0,2) = 1, T(n,k) = T(n-1,k) + T(n,k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 0, 3, 3, 0, 0, 3, 6, 3, 0, 0, 0, 9, 9, 0, 0, 0, 0, 9, 18, 9, 0, 0, 0, 0, 0, 27, 27, 0, 0, 0, 0, 0, 0, 27, 54, 27, 0, 0, 0, 0, 0, 0, 0, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 81, 162, 81, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 13 2013

Keywords

Examples

			Square array begins:
1, 1, 1,  0,  0,   0,   0,   0, 0, ... n = 0
1, 2, 3,  3,  0,   0,   0,   0, 0, ... n = 1
1, 3, 6,  9,  9,   0,   0,   0, 0, ... n = 2
0, 3, 9, 18, 27,  27,   0,   0, 0, ... n = 3
0, 0, 9, 27, 54,  81,  81,   0, 0, ... n = 4
0, 0, 0, 27, 81, 162, 243, 243, 0, ... n = 5
....
		

Crossrefs

Formula

T(n,n) = A025192(n).
T(n+1,n) = T(n+2,n) = T(n,n+1) = T(n,n+2) = 3^n = A000244(n).
Sum_{k, 0<=k<=n} T(n-k,k) = A068911(n).

A052945 Number of compositions of n when each odd part can be of two kinds.

Original entry on oeis.org

1, 2, 5, 14, 38, 104, 284, 776, 2120, 5792, 15824, 43232, 118112, 322688, 881600, 2408576, 6580352, 17977856, 49116416, 134188544, 366609920, 1001596928, 2736413696, 7476021248, 20424869888, 55801782272, 152453304320
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Also number of compositions of n into 2 sorts of parts where the kinds of parts are unordered inside a run of identical parts, see example. Replacing "unordered" by "ordered" gives A025192. - Joerg Arndt, Apr 28 2013
Numbers of straight-chain fatty acids involving oxo groups (or hydroxy groups), if cis-/trans isomerism is considered while stereoisomerism is neglected. - Stefan Schuster, Apr 19 2018

Examples

			a(3)=14 because we have (3),(3'),(1,2),(1',2),(2,1),(2,1'),(1,1,1),(1,1,1'),(1,1',1),(1,1',1'),(1',1,1),(1',1,1'),(1',1',1) and (1',1',1').
There are a(3)=14 such compositions of 3. Here p:s stands for "part p of sort s":
01:  [ 1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:1  ]
03:  [ 1:0  1:1  1:1  ]
04:  [ 1:0  2:0  ]
05:  [ 1:0  2:1  ]
06:  [ 1:1  1:1  1:1  ]
07:  [ 1:1  2:0  ]
08:  [ 1:1  2:1  ]
09:  [ 2:0  1:0  ]
10:  [ 2:0  1:1  ]
11:  [ 2:1  1:0  ]
12:  [ 2:1  1:1  ]
13:  [ 3:0  ]
14:  [ 3:1  ]
- _Joerg Arndt_, Apr 28 2013
		

Crossrefs

Row sums of A105474.

Programs

  • GAP
    a:=[2,5];; for n in [3..30] do a[n]:=2*(a[n-1]+a[n-2]); od; Concatenation([1], a); # G. C. Greubel, Oct 18 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^2)/(1-2*x-2*x^2) )); // G. C. Greubel, Oct 18 2019
    
  • Maple
    spec:= [S,{S=Sequence(Prod(Union(Sequence(Prod(Z,Z)),Sequence(Z)),Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(coeff(series((1-x^2)/(1-2*x-2*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 18 2019
  • Mathematica
    LinearRecurrence[{2,2,}, {1,2,5}, 30] (* G. C. Greubel, Oct 18 2019 *)
  • PARI
    Vec((x-1)*(1+x)/(-1+2*x+2*x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    def A052945_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x^2)/(1-2*x-2*x^2) ).list()
    A052945_list(30) # G. C. Greubel, Oct 18 2019
    

Formula

G.f.: (1 - x)*(1 + x)/(1 - 2*x - 2*x^2).
a(n) = 2*(a(n-1) + a(n-2)).
a(n) = Sum_{alpha=RootOf(-1+2*z+2z^2)} alpha^(-1-n)/4.
From Al Hakanson (hawkuu(AT)gmail.com), Jun 29 2009: (Start)
a(n) = ((2+sqrt(3))*(1+sqrt(3))^(n-1) + (2-sqrt(3))*(1-sqrt(3))^(n-1))/2 for n>0.
First binomial transform of 2, 3, 6, 9, 18, 27, 54, 81, ... starting after 1. (End)

Extensions

More terms from James Sellers, Jun 05 2000
Better description from Emeric Deutsch, Apr 09 2005

A117855 Number of nonzero palindromes of length n (in base 3).

Original entry on oeis.org

2, 2, 6, 6, 18, 18, 54, 54, 162, 162, 486, 486, 1458, 1458, 4374, 4374, 13122, 13122, 39366, 39366, 118098, 118098, 354294, 354294, 1062882, 1062882, 3188646, 3188646, 9565938, 9565938, 28697814, 28697814, 86093442, 86093442, 258280326, 258280326, 774840978
Offset: 1

Views

Author

Martin Renner, May 02 2006

Keywords

Comments

See A225367 for the sequence that counts all base 3 palindromes, including 0 (and thus also the number of n-digit terms in A006072). -- A nonzero palindrome of length L=2k-1 or of length L=2k is determined by the first k digits, which then determine the last k digits by symmetry. Since the first digit cannot be 0, there are 2*3^(k-1) possibilities. - M. F. Hasler, May 05 2013
From Gus Wiseman, Oct 18 2023: (Start)
Also the number of subsets of {1..n} with n not the sum of two subset elements (possibly the same). For example, the a(0) = 1 through a(4) = 6 subsets are:
{} {} {} {} {}
{1} {2} {1} {1}
{2} {3}
{3} {4}
{1,3} {1,4}
{2,3} {3,4}
For subsets with no subset summing to n we have A365377.
Requiring pairs to be distinct gives A068911, complement A365544.
The complement is counted by A366131.
(End) [Edited by Peter Munn, Nov 22 2023]

Examples

			The a(3)=6 palindromes of length 3 are: 101, 111, 121, 202, 212, and 222. - _M. F. Hasler_, May 05 2013
		

Crossrefs

Cf. A050683 and A070252.
Bisections are both A025192.
A093971/A088809/A364534 count certain types of sum-full subsets.
A108411 lists powers of 3 repeated, complement A167936.

Programs

  • Mathematica
    With[{c=NestList[3#&,2,20]},Riffle[c,c]] (* Harvey P. Dale, Mar 25 2018 *)
    Table[Length[Select[Subsets[Range[n]],!MemberQ[Total/@Tuples[#,2],n]&]],{n,0,10}] (* Gus Wiseman, Oct 18 2023 *)
  • PARI
    A117855(n)=2*3^((n-1)\2) \\ - M. F. Hasler, May 05 2013
    
  • Python
    def A117855(n): return 3**(n-1>>1)<<1 # Chai Wah Wu, Oct 28 2024

Formula

a(n) = 2*3^floor((n-1)/2).
a(n) = 2*A108411(n-1).
From Colin Barker, Feb 15 2013: (Start)
a(n) = 3*a(n-2).
G.f.: -2*x*(x+1)/(3*x^2-1). (End)

Extensions

More terms from Colin Barker, Feb 15 2013

A124182 A skewed version of triangular array A081277.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 0, 3, 4, 0, 0, 1, 8, 8, 0, 0, 0, 5, 20, 16, 0, 0, 0, 1, 18, 48, 32, 0, 0, 0, 0, 7, 56, 112, 64, 0, 0, 0, 0, 1, 32, 160, 256, 128, 0, 0, 0, 0, 0, 9, 120, 432, 576, 256, 0, 0, 0, 0, 0, 1, 50, 400, 1120, 1280, 512
Offset: 0

Views

Author

Philippe Deléham, Dec 05 2006

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, -1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 0, 0, 0, 0, 0, 0,...] where DELTA is the operator defined in A084938. Falling diagonal sums in A052980.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 2;
  0, 0, 3, 4;
  0, 0, 1, 8,  8;
  0, 0, 0, 5, 20, 16;
  0, 0, 0, 1, 18, 48,  32;
  0, 0, 0, 0,  7, 56, 112,  64;
  0, 0, 0, 0,  1, 32, 160, 256,  128;
  0, 0, 0, 0,  0,  9, 120, 432,  576,  256;
  0, 0, 0, 0,  0,  1,  50, 400, 1120, 1280, 512;
		

Crossrefs

Cf. A025192 (column sums). Diagonals include A011782, A001792, A001793, A001794, A006974, A006975, A006976.

Formula

T(0,0)=T(1,1)=1, T(n,k)=0 if n < k or if k < 0, T(n,k) = T(n-2,k-1) + 2*T(n-1,k-1).
Sum_{k=0..n} x^k*T(n,k) = (-1)^n*A090965(n), (-1)^n*A084120(n), (-1)^n*A006012(n), A033999(n), A000007(n), A001333(n), A084059(n) for x = -4, -3, -2, -1, 0, 1, 2 respectively.
Sum_{k=0..floor(n/2)} T(n-k,k) = Fibonacci(n-1) = A000045(n-1).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 respectively. - Philippe Deléham, Dec 26 2007
Sum_{k=0..n} T(n,k)*(-x)^(n-k) = A011782(n), A000012(n), A146559(n), A087455(n), A138230(n), A006495(n), A138229(n) for x= 0,1,2,3,4,5,6 respectively. - Philippe Deléham, Nov 14 2008
G.f.: (1-y*x)/(1-2y*x-y*x^2). - Philippe Deléham, Dec 04 2011
Sum_{k=0..n} T(n,k)^2 = A002002(n) for n > 0. - Philippe Deléham, Dec 04 2011

A053979 Triangle T(n,k) giving number of rooted maps regardless of genus with n edges and k nodes (n >= 0, k = 1..n+1).

Original entry on oeis.org

1, 1, 1, 3, 5, 2, 15, 32, 22, 5, 105, 260, 234, 93, 14, 945, 2589, 2750, 1450, 386, 42, 10395, 30669, 36500, 22950, 8178, 1586, 132, 135135, 422232, 546476, 388136, 166110, 43400, 6476, 429, 2027025, 6633360, 9163236, 7123780, 3463634, 1092560, 220708, 26333, 1430
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Triangle T(n,k), read by rows, given by (1,2,3,4,5,6,7,8,9,...) DELTA (1,1,1,1,1,1,1,1,1,1,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 21 2011.
A127160*A007318 as infinite lower triangular matrices. - Philippe Deléham, Jan 06 2012

Examples

			A(x;t) = t + (t + t^2)*x + (3*t + 5*t^2 + 2*t^3)*x^2 + (15*t + 32*t^2 + 22*t^3 + 5*t^4)*x^3 + ...
Triangle begins :
n\k [1]     [2]     [3]     [4]     [5]     [6]    [7]   [8]
[0] 1;
[1] 1,      1;
[2] 3,      5,      2;
[3] 15,     32,     22,     5;
[4] 105,    260,    234,    93,     14;
[5] 945,    2589,   2750,   1450,   386,    42;
[6] 10395,  30669,  36500,  22950,  8178,   1586,  132;
[7] 135135, 422232, 546476, 388136, 166110, 43400, 6476, 429;
[8] ...
		

Crossrefs

Programs

  • Maple
    G:=t/(1-(t+1)*z/(1-(t+2)*z/(1-(t+3)*z/(1-(t+4)*z/(1-(t+5)*z/(1-(t+6)*z/(1-(t+7)*z/(1-(t+8)*z/(1-(t+9)*z/(1-(t+10)*z/(1-(t+11)*z/(1-(t+12)*z)))))))))))):Gser:=simplify(series(G,z=0,10)):P[0]:=t:for n from 1 to 9 do P[n]:=sort(expand(coeff(Gser,z^n))) od:seq(seq(coeff(P[n],t^k),k=1..n+1),n=0..9); # Emeric Deutsch, Apr 01 2005
  • Mathematica
    g = t/Fold[1-((t+#2)*z)/#1&, 1, Range[12, 1, -1]]; T[n_, k_] := SeriesCoefficient[g, {z, 0, n}, {t, 0, k}]; Table[T[n, k], {n, 0, 9}, {k, 1, n+1}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)
  • PARI
    A053979_ser(N,t='t) = {
      my(x='x+O('x^N), y0=1, y1=0, n=1);
      while(n++, y1 = (1 + t*x*y0^2 + 2*x^2*y0')/(1-x);
        if (y1 == y0, break()); y0 = y1); y0;
    };
    concat(apply(p->Vecrev(p), Vec(A053979_ser(10))))
    \\ test: y=A053979_ser(50); 2*x^2*deriv(y,x) == -t*x*y^2 + (1-x)*y - 1
    \\ Gheorghe Coserea, May 31 2017
    
  • PARI
    A053979_seq(N) = {
      my(t='t, R=vector(N), S=vector(N)); R[1]=S[1]=t;
      for (n=2, N,
        R[n] = t*subst(S[n-1],t,t+1);
        S[n] = R[n] + sum(k=1, n-1, R[k]*S[n-k]));
      apply(p->Vecrev(p), R/t);
    };
    concat(A053979_seq(10))
    \\ test: y=t*Ser(apply(p->Polrev(p,'t), A053979_seq(50)),'x); y == t + x*y^2 + x*y + 2*x^2*deriv(y,x) && y == t + x*y*subst(y,t,t+1) \\ Riccati eq && Dyck eq
    \\ Gheorghe Coserea, May 31 2017

Formula

G.f.: t/(1-(t+1)z/(1-(t+2)z/(1-(t+3)z/(1-(t+4)z/(1-(t+5)z/(1-... (Eq. (5) in the Arques-Beraud reference). - Emeric Deutsch, Apr 01 2005
Sum_{k = 0..n} (-1)^k*2^(n-k)*T(n,k) = A128709(n). Sum_{k = 0..n} T(n,k) = A000698(n+1). - Philippe Deléham, Mar 24 2007
From Peter Bala, Dec 22 2011: (Start)
The o.g.f. in the form G(x,t) = x/(1 - (t+1)*x^2/(1 - (t+2)*x^2/(1 - (t+3)*x^2/(1 - (t+4)*x^2/(1 - ... ))))) = x + (1+t)*x^3 + (3+5*t+2*t^2)*x^5 + ... satisfies the Riccati equation (1 - t*x*G)*G = x + x^3*dG/dx. The cases t = 0, t = 1 and t = 2 give A001147, A000698 and A167872, respectively. The cases t = -2, t = -3 and t = -4 give rational generating functions for aerated and signed versions of A000012, A025192 and A084120, respectively.
The identity G(x,1+t) = 1/(1+t)(1/x-1/G(x,t)) provided t <> -1 allows us to express G(x,n), n = 1,2,..., in terms of G(x,0), a generating function for the double factorial numbers.
Writing G(x,t) = Sum_{n >= 1} R(n,t)*x^(2*n-1), the row generating polynomials R(n,t) satisfy the recurrence R(n+1,t) = (2*n-1)*R(n,t) + t*sum {k = 1..n} R(k,t)*R(n+1-k,t) with initial condition R(1,t) = 1.
G(x,t-1) = x + t*x^3 + (t+2*t^2)*x^5 + (3*t+7*t^2+5*t^3)*x^7 + ... is an o.g.f. for A127160.
The function b(x,t) = - t*G(1/x,t) satisfies the partial differential equation d/dx(b(x,t)) = -(t + (x + b(x,t))*b(x,t)). Hence the differential operator (D^2 + x*D + t), where D = d/dx, factorizes as (D - a(x,t))*(D - b(x,t)), where a(x,t) = -(x + b(x,t)). In the particular case t = -n, a negative integer, the functions a(x,-n) and b(x,-n) become rational functions of x expressible as the ratio of Hermite polynomials.
(End)

Extensions

More terms from Emeric Deutsch, Apr 01 2005

A064017 Number of ternary trees (A001764) with n nodes and maximal diameter.

Original entry on oeis.org

1, 3, 12, 45, 162, 567, 1944, 6561, 21870, 72171, 236196, 767637, 2480058, 7971615, 25509168, 81310473, 258280326, 817887699, 2582803260, 8135830269, 25569752274, 80196041223, 251048476872, 784526490225, 2447722649502
Offset: 1

Views

Author

Danail Bonchev (bonchevd(AT)aol.com), Sep 07 2001

Keywords

Comments

A problem important for polymer science because it counts the trees having unbranched branches; they are called "combs".
Equals (1, 3, 9, 27, 81, ...) convolved with (1, 0, 3, 9, 27, 81, ...). Example: a(5) = 162 = (81, 27, 9, 3, 1) dot (1, 0, 3, 9, 27) = 81 + 3*27. - Gary W. Adamson, Jul 31 2010
Floretion Algebra Multiplication Program, FAMP Code: lesforseq[ - 'i + 'j - 'kk' - 'ki' - 'kj' ], vesforseq(n) = 3^n, tesforseq = A006234

Examples

			a(5) = 162 because we can write (5+1)*3^(5-2) = 6*3^3 = 6*27.
		

Crossrefs

Programs

  • Maple
    a:=n->ceil(sum(3^(n-2),j=0..n)): seq(a(n), n=1..26); # Zerinvary Lajos, Jun 05 2008
  • Mathematica
    Join[{1},Table[(n+1)3^(n-2),{n,2,30}]] (* or *) Join[{1}, LinearRecurrence[ {6,-9},{3,12},30]] (* Harvey P. Dale, Feb 07 2012 *)
  • PARI
    { for (n=1, 200, if (n>1, a=(n + 1)*p; p*=3, a=p=1); write("b064017.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 06 2009
    
  • PARI
    a(n)=if(n==1, 1, (n+1)*3^(n-2)); \\ Joerg Arndt, May 06 2013
    
  • SageMath
    @CachedFunction
    def BB(n, k, x):  # modified cardinal B-splines
        if n == 1: return 0 if (x < 0) or (x >= k) else 1
        return x*BB(n-1, k, x) + (n*k-x)*BB(n-1, k, x-k)
    def EulerianPolynomial(n, k, x):
        if n == 0: return 1
        return add(BB(n+1, k, k*m+1)*x^m for m in (0..n))
    def A064017(n) : return 3^(n-1)*EulerianPolynomial(1,n-1,1/3) if n != 1 else 1
    [A064017(n) for n in (1..25)]  # Peter Luschny, May 04 2013

Formula

a(n) = 3*a(n-1) + 3^(n-2).
a(n) = (n+1)*3^(n-2), for n > 1.
From Paul Barry, Sep 05 2003: (Start)
a(n) = (n+2)3^(n-1) + 0^n/3 (offset 0).
a(n) = A025192(n) + A027471(n). (End)
A006234(n+4) - a(n+2) = 3^n. - Creighton Dement, Mar 01 2005
a(n+1) = Sum_{k=0..n} A196389(n,k)*3^k. - Philippe Deléham, Oct 31 2011
G.f.: (1 - 3*x + 3*x^2)*x/(1 - 3*x)^2. - Philippe Deléham, Oct 31 2011
a(n) = 6*a(n-1) - 9*a(n-2), with a(1)=1, a(2)=3, a(3)=12. - Harvey P. Dale, Feb 07 2012
E.g.f.: (exp(3*x)*(1 + 3*x) - 1)/9. - Stefano Spezia, Mar 05 2020
From Amiram Eldar, Jan 18 2021: (Start)
Sum_{n>=1} 1/a(n) = 27*log(3/2) - 19/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 17/2 - 27*log(4/3). (End)
Previous Showing 11-20 of 84 results. Next