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-6 of 6 results.

A095263 a(n+3) = 3*a(n+2) - 2*a(n+1) + a(n).

Original entry on oeis.org

1, 3, 7, 16, 37, 86, 200, 465, 1081, 2513, 5842, 13581, 31572, 73396, 170625, 396655, 922111, 2143648, 4983377, 11584946, 26931732, 62608681, 145547525, 338356945, 786584466, 1828587033, 4250949112, 9882257736, 22973462017, 53406819691
Offset: 1

Views

Author

Gary W. Adamson, May 31 2004

Keywords

Comments

a(n+1) = number of n-tuples over {0,1,2} without consecutive digits. For the general case see A096261.
Diagonal sums of Riordan array (1/(1-x)^3, x/(1-x^3)), A127893. - Paul Barry, Jan 07 2008
The signed variant (-1)^(n+1)*a(n+1) is the bottom right entry of the n-th power of the matrix [[0,1,0],[0,0,1],[-1,-2,-3]]. - Roger L. Bagula, Jul 01 2007
a(n) is the number of generalized compositions of n+1 when there are i^2/2-i/2 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Dedrickson (Section 4.1) gives a bijection between colored compositions of n, where each part k has one of binomial(k,2) colors, and 0,1,2 strings of length n-2 without sequential digits (i.e., avoiding 01 and 12). Cf. A052529. - Peter Bala, Sep 17 2013
Except for the initial 0, this is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^2 - S^3; see A291000. - Clark Kimberling, Aug 24 2017
For n>1, a(n-1) is the number of ways to split [n] into an unspecified number of intervals and then choose 2 blocks (i.e., subintervals) from each interval. For example, for n=6, a(5)=37 since the number of ways to split [6] into intervals and then select 2 blocks from each interval is C(6,2) + C(4,2)*C(2,2) + C(3,2)*C(3,2) + C(2,2)*C(4,2) + C(2,2)*C(2,2)*C(2,2). - Enrique Navarrete, May 20 2022

Examples

			a(9) = 1081 = 3*465 - 2*200 + 86.
M^9 * [1 0 0] = [a(7) a(8) a(9)] = [200 465 1081].
G.f. = x + 3*x^2 + 7*x^3 + 16*x^4 + 37*x^5 + 86*x^6 + 200*x^7 + ...
		

Crossrefs

Cf. A052921 (first differences), A137229 (partial sums).
Column k=3 of A277666.

Programs

  • Magma
    I:=[1,3,7]; [n le 3 select I[n] else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..30]]; // G. C. Greubel, Apr 12 2021
    
  • Maple
    A:= gfun:-rectoproc({a(n+3)=3*a(n+2)-2*a(n+1)+a(n),a(1)=1,a(2)=3,a(3)=7},a(n),remember):
    seq(A(n),n=1..100); # Robert Israel, Sep 15 2014
  • Mathematica
    a[1]=1; a[2]=3; a[3]=7; a[n_]:= a[n]= 3a[n-1] -2a[n-2] +a[n-3]; Table[a[n], {n, 22}] (* Or *)
    a[n_]:= (MatrixPower[{{0,1,2,3}, {1,2,3,0}, {2,3,0,1}, {3,0,1,2}}, n].{{1}, {0}, {0}, {0}})[[2, 1]]; Table[ a[n], {n, 22}] (* Robert G. Wilson v, Jun 16 2004 *)
    RecurrenceTable[{a[1]==1,a[2]==3,a[3]==7,a[n+3]==3a[n+2]-2a[n+1]+a[n]},a,{n,30}] (* Harvey P. Dale, Sep 17 2022 *)
  • Sage
    [sum( binomial(n+k+1,3*k+2) for k in (0..(n-1)//2)) for n in (1..30)] # G. C. Greubel, Apr 12 2021

Formula

Let M = the 3 X 3 matrix [0 1 0 / 0 0 1 / 1 -2 3]; then M^n *[1 0 0] = [a(n-2) a(n-1) a(n)].
a(n)/a(n-1) tends to 2.3247179572..., an eigenvalue of M and a root of the characteristic polynomial. [Is that constant equal to 1 + A060006? - Michel Marcus, Oct 11 2014] [Yes, the limit is the root of the equation -1 + 2*x - 3*x^2 + x^3 = 0, after substitution x = y + 1 we have the equation for y: -1 - y + y^3 = 0, y = A060006. - Vaclav Kotesovec, Jan 27 2015]
Related to the Padovan sequence A000931 as follows : a(n)=A000931(3n+4). Also the binomial transform of A000931(n+4).
From Paul Barry, Jul 06 2004: (Start)
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n+k, n-2*k+1).
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n+k, 3*k-1). (End)
From Paul Barry, Jan 07 2008: (Start)
G.f.: x/(1 -3*x +2*x^2 -x^3).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+k+2,3*k+2).
a(n) = Sum_{k=0..n} binomial(n,k) * Sum_{j=0..floor((k+4)/2)} binomial(j,k-2j+4). (End)
If p[i]=i(i-1)/2 and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=2, a(n-1)=det A. - Milan Janjic, May 02 2010
a(n) = A000931(3*n + 4). - Michael Somos, Sep 18 2012

Extensions

Edited by Paul Barry, Jul 06 2004
Corrected and extended by Robert G. Wilson v, Jun 05 2004

A052529 Expansion of (1-x)^3/(1 - 4*x + 3*x^2 - x^3).

Original entry on oeis.org

1, 1, 4, 13, 41, 129, 406, 1278, 4023, 12664, 39865, 125491, 395033, 1243524, 3914488, 12322413, 38789712, 122106097, 384377665, 1209982081, 3808901426, 11990037126, 37743426307, 118812495276, 374009739309, 1177344897715
Offset: 0

Views

Author

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

Keywords

Comments

a(n+1) is the number of distinct matrix products in (A+B+C+D)^n where commutator [A,B] = [A,C] = [B,C] = 0 but D does not commute with A, B, or C. - Paul D. Hanna and Max Alekseyev, Feb 01 2006
Starting (1, 4, 13, ...) = INVERT transform of the triangular series, (1, 3, 6, 10, ...). Example: a(5) = 129 = termwise products of (1, 1, 4, 13, 41) and (15, 10, 6, 3, 1) = (15 + 10 + 24 + 39 + 41). - Gary W. Adamson, Apr 10 2009
a(n) is the number of generalized compositions of n when there are i^2/2+i/2 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Dedrickson (Section 4.2) gives a bijection between colored compositions of n, where each part k has one of binomial(k+1,2) colors, and 0,1,2,3 strings of length n-1 avoiding 10, 20 and 21. Cf. A095263. For a refinement of this sequence counting binomial(k+1,2)-colored compositions by the number of parts see A127893. - Peter Bala, Sep 17 2013

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 80.

Crossrefs

Trisection of A000930.
First differences of A052544.
Row sums of triangle A127893.

Programs

  • Magma
    I:=[1, 1, 4, 13, 41, 129]; [n le 6 select I[n] else 4*Self(n-1) -3*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 22 2012
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Sequence(Z),Sequence(Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    f:= gfun:-rectoproc({a(n+4)-4*a(n+3)+3*a(n+2)-a(n+1), a(0) = 1, a(1) = 1, a(2) = 4, a(3) = 13},a(n),`remember`):
    seq(f(n),n=0..40); # Robert Israel, Dec 19 2014
  • Mathematica
    CoefficientList[Series[(-1+x)^3/(-1+4*x-3*x^2+x^3),{x,0,40}],x] (* Vincenzo Librandi, Jun 22 2012 *)
    LinearRecurrence[{4,-3,1},{1,1,4,13},30] (* Harvey P. Dale, Oct 04 2015 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)^3/(1-4*x+3*x^2-x^3)) \\ G. C. Greubel, May 12 2019
    
  • Sage
    ((1-x)^3/(1-4*x+3*x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 12 2019

Formula

a(n) = Sum_{a=0..n} (Sum_{b=0..n} (Sum_{c=0..n} C(n-b-c,a)*C(n-a-c,b)*C(n-a-b,c))).
G.f.: (1 - x)^3/(1 - 4*x + 3*x^2 - x^3).
a(n) = 4*a(n-1) - 3*a(n-2) + a(n-3) for n>=4.
a(n) = Sum_{alpha = RootOf(-1+4*x-3*x^2+x^3)} (1/31)*(6 - 5*alpha - 3*alpha^2) * alpha^(-1-n).
For n>0, a(n) = Sum_{k=0..n-1} Sum_{i=0..k} Sum_{j=0..i} a(j). - Benoit Cloitre, Jan 26 2003
a(n) = Sum_{k=0..n} binomial(n+2*k-1, n-k). - Vladeta Jovovic, Mar 23 2003
If p[i]=i(i+1)/2 and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, May 02 2010
Recurrence equation: a(n) = Sum_{k = 1..n} 1/2*k*(k+1)*a(n-k) with a(0) = 1. - Peter Bala, Sep 19 2013
a(n) = Sum_{i=0..n} (n-i)*A052544(i) = A052544(n) - A052544(n-1) for n>=1. - Areebah Mahdia, Jul 07 2020

A122432 Riordan array (1/(1+x)^3,x).

Original entry on oeis.org

1, -3, 1, 6, -3, 1, -10, 6, -3, 1, 15, -10, 6, -3, 1, -21, 15, -10, 6, -3, 1, 28, -21, 15, -10, 6, -3, 1, -36, 28, -21, 15, -10, 6, -3, 1, 45, -36, 28, -21, 15, -10, 6, -3, 1, -55, 45, -36, 28, -21, 15, -10
Offset: 0

Views

Author

Paul Barry, Sep 04 2006

Keywords

Comments

Sequence array for (-1)^n*C(n+2,2). Inverse of A122431. Row sums are -A083392(n+1). Antidiagonal sums are (-1)^n*A002623(n).
Call the unsigned version of this array M and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite matrix product M(0)*M(1)*M(2)*..., which is clearly well-defined, is equal to A127893. - Peter Bala, Jul 22 2014
From Wolfdieter Lang, Apr 05 2020: (Start)
Triangle T(n, k) has the k=0 column (-1)^n*A000217(n+1) = (-1)^n*binomial(n+2, 2), then repeated and down-shifted.
The unsigned triangle, i.e., Tup(n, k) := (-1)^(n-k)*T(n-1,k-1) = binomial(n-k+2, 2) with n >= 1, k = 1..n, gives the number of triangles of length k (in some units), for k = 1..n, in the matchstick arrangement (or tower of cards, with n cards as basis) with an enclosing triangle of length n, but only triangles with orientation (up) like the enclosing triangle are counted. The total number of matchsticks (cards) is 3*A000217(n). (See the comment by Andrew Howroyd in A085691). Recurrence: Tup(n, k) = 0 for n < k, Tup(1, 1) = 1, and Tup(n, k) = Tup(n-1, k) + n - k + 1, for n >= 2, k = 1..n. Row sums give A000292(n). (End)

Examples

			The triangle T(n, k) begins:
n\k  0   1   2   3   4   5   6  7  8  9 ...
-------------------------------------------
0:   1
1  :-3   1
2:   6  -3   1
3: -10   6  -3   1
4:  15 -10   6  -3   1
5; -21  15 -10   6  -3   1
6:  28 -21  15 -10   6  -3   1
7: -36  28 -21  15 -10   6  -3  1
8:  45 -36  28 -21  15 -10   6 -3  1
9: -55  45 -36  28 -21  15 -10  6 -3  1
... reformattet by - _Wolfdieter Lang_, Apr 05 2020
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[(-1)^(n-k)*Binomial(n-k+2, 2): k in [1..n]]: n in [1..10]]; // G. C. Greubel, Oct 29 2017
  • Mathematica
    Table[(-1)^(n - k)*Binomial[n - k + 2, 2], {n, 0, 49}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 29 2017 *)
  • PARI
    for(n=0,10, for(k=0,n, print1((-1)^(n-k)*binomial(n-k+2,2), ", "))) \\ G. C. Greubel, Oct 29 2017
    

Formula

Number triangle T(n, k) = [k<=n]*(-1)^(n-k)*binomial(n-k+2, 2).
Recurrence: T(n, k) = - T(n-1, k) + (-1)^(n-k)*(n-k+1), for n >= 0, and k = 0..n. - Wolfdieter Lang, Apr 06 2020

A127895 Riordan array (1/(1+x)^3, x/(1+x)^3).

Original entry on oeis.org

1, -3, 1, 6, -6, 1, -10, 21, -9, 1, 15, -56, 45, -12, 1, -21, 126, -165, 78, -15, 1, 28, -252, 495, -364, 120, -18, 1, -36, 462, -1287, 1365, -680, 171, -21, 1, 45, -792, 3003, -4368, 3060, -1140, 231, -24, 1, -55, 1287, -6435, 12376, -11628, 5985, -1771, 300, -27, 1
Offset: 0

Views

Author

Paul Barry, Feb 04 2007

Keywords

Comments

The matrix inverse of the convolution triangle of A001764 (number of ternary trees). - Peter Luschny, Oct 09 2022

Examples

			Triangle begins
    1;
   -3,     1;
    6,    -6,     1;
  -10,    21,    -9,      1;
   15,   -56,    45,    -12,      1;
  -21,   126,  -165,     78,    -15,      1;
   28,  -252,   495,   -364,    120,    -18,     1;
  -36,   462, -1287,   1365,   -680,    171,   -21,     1;
   45,  -792,  3003,  -4368,   3060,  -1140,   231,   -24,   1;
  -55,  1287, -6435,  12376, -11628,   5985, -1771,   300, -27,   1;
   66, -2002, 12870, -31824,  38760, -26334, 10626, -2600, 378, -30, 1;
		

Crossrefs

Inverse is A127898.
Alternating sign version of A127893.

Programs

  • Magma
    [(-1)^(n-k)*Binomial(n+2*k+2, n-k): k in [0..n], n in [0..10]]; // G. C. Greubel, Apr 29 2018
    
  • Maple
    # Uses function InvPMatrix from A357585. Adds column 1, 0, 0, ... to the left.
    InvPMatrix(10, n -> binomial(3*n, n)/(2*n+1)); # Peter Luschny, Oct 09 2022
  • Mathematica
    Table[(-1)^(n-k)*Binomial[n+2*k+2, n-k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 29 2018 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1((-1)^(n-k)*binomial(n+2*k+2, n-k), ", "))) \\ G. C. Greubel, Apr 29 2018
    
  • Sage
    flatten([[(-1)^(n-k)*binomial(n+2*k+2, n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 16 2021

Formula

T(n, k) = (-1)^(n-k)*binomial(n +2*k +2, n-k).
Sum_{k=0..n} T(n, k) = A127896(n) (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^n*A095263(n) (diagonal sums).

Extensions

Terms a(50) onward added by G. C. Greubel, Apr 29 2018

A127894 Inverse of Riordan array (1/(1-x)^3, x/(1-x)^3).

Original entry on oeis.org

1, -3, 1, 12, -6, 1, -55, 33, -9, 1, 273, -182, 63, -12, 1, -1428, 1020, -408, 102, -15, 1, 7752, -5814, 2565, -760, 150, -18, 1, -43263, 33649, -15939, 5313, -1265, 207, -21, 1, 246675, -197340, 98670, -35880, 9750, -1950, 273, -24, 1
Offset: 0

Views

Author

Paul Barry, Feb 04 2007

Keywords

Comments

First column is (-1)^n*A001764(n+1). Row sums are (-1)^n*A006013(n). Inverse of A127893.

Examples

			Triangle begins
1,
-3, 1,
12, -6, 1,
-55, 33, -9, 1,
273, -182, 63, -12, 1,
-1428, 1020, -408, 102, -15, 1,
7752, -5814, 2565, -760, 150, -18, 1,
-43263, 33649, -15939, 5313, -1265, 207, -21, 1,
246675, -197340, 98670, -35880, 9750, -1950, 273, -24, 1,
-1430715, 1170585, -610740, 237510, -71253, 16443, -2842, 348, -27, 1,
8414640, -7012200, 3786588, -1553472, 503440, -129456, 26040, -3968, 432, -30, 1
		

Crossrefs

Programs

  • Mathematica
    Table[If[k == 0, (-1)^(n-1)*Binomial[3*n, n-k]/(2*n+1), (-1)^(n-k-1)*((k + 1)/(n))*Binomial[3*n, n-k-1]], {n, 1, 100}, {k, 0, n-1}] // Flatten (* G. C. Greubel, Apr 29 2018 *)
  • PARI
    for(n=1,10, for(k=0,n-1, print1(if(k==0, (-1)^(n-1)*binomial(3*n, n-k)/(2*n+1), (-1)^(n-k-1)*((k+1)/n)*binomial(3*n, n-k-1)), ", "))) \\ G. C. Greubel, Apr 29 2018

Extensions

Terms a(39) onward added by G. C. Greubel, Apr 29 2018

A206294 Riordan array (1, x/(1-x)^3).

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 6, 6, 1, 0, 10, 21, 9, 1, 0, 15, 56, 45, 12, 1, 0, 21, 126, 165, 78, 15, 1, 0, 28, 252, 495, 364, 120, 18, 1, 0, 36, 462, 1287, 1365, 680, 171, 21, 1, 0, 45, 792, 3003, 4368, 3060, 1140, 231, 24, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 05 2012

Keywords

Comments

The convolution triangle of the triangular numbers A000217. - Peter Luschny, Oct 07 2022

Examples

			Triangle begins:
1
0, 1
0, 3, 1
0, 6, 6, 1
0, 10, 21, 9, 1
0, 15, 56, 45, 12, 1
0, 21, 126, 165, 78, 15, 1
0, 28, 252, 495, 364, 120, 18, 1
0, 36, 462, 1287, 1365, 680, 171, 21, 1
0, 45, 792, 3003, 4368, 3060, 1140, 231, 24, 1
0, 55, 1287, 6435, 12376, 11628, 5985, 1771, 300, 27, 1
0, 66, 2002, 12870, 31824, 38760, 26324, 10626, 2600, 378, 30, 1
		

Crossrefs

Cf. Columns: A000007, A000217 (triangular numbers), A000389, A000581, A001288, A010967..(+3)..A011000, A017714..(+3)..A017762.
Row sums are A052529.
Cf. A127893.

Programs

  • Maple
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> n * (n + 1) / 2); # Peter Luschny, Oct 07 2022
  • Mathematica
    Table[If[n == 0 && k == 0 , 1, Binomial[n - 1 + 2 k, n - k]], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 25 2017 *)
  • PARI
    {T(n,k)=polcoeff(1/(1-x+x*O(x^(n-k)))^(3*k),n-k)}
    
  • PARI
    {T(n,k)=polcoeff(polcoeff((1-x)^3/((1-x)^3-y*x +x*O(x^n)),n,x),k,y)}
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print(""))

Formula

Triangle T(n,k), read by rows, given by (0, 3, -1, 2/3, -1/6, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
T(n,0) = 0^n, T(n,k) = C(n-1+2k, n-k) for k > 0.
T(n,n) = 1, T(k+1,k) = 3*k = A008585(k), T(k+2,k) = A081266(k).
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A052529(n), A052910(n) for x = 0, 1, 2 respectively.
G.f.: (1-x)^3/((1-x)^3-y*x).
Showing 1-6 of 6 results.