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-7 of 7 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

A097550 Number of positive words of length n in the monoid Br_3 of positive braids on 4 strands.

Original entry on oeis.org

1, 3, 8, 19, 44, 102, 237, 551, 1281, 2978, 6923, 16094, 37414, 86977, 202197, 470051, 1092736, 2540303, 5905488, 13728594, 31915109, 74193627, 172479257, 400965626, 932131991, 2166943978, 5037533578, 11710844769, 27224411129, 63289077427
Offset: 0

Views

Author

D n Verma, Aug 16 2004

Keywords

Crossrefs

Programs

  • Magma
    [n le 3 select Fibonacci(2*n) else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..31]]; // G. C. Greubel, Apr 19 2021
    
  • Maple
    a:= n-> (<<1|1|2>>. <<3|1|0>, <-2|0|1>, <1|0|0>>^n)[1$2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 24 2008
  • Mathematica
    LinearRecurrence[{3,-2,1},{1,3,8},30] (* Harvey P. Dale, Jul 10 2019 *)
  • Sage
    @CachedFunction
    def A095263(n): return sum( binomial(n+j+2, 3*j+2) for j in (0..n//2) )
    def A097550(n): return A095263(n) +A095263(n-2)
    [A097550(n) for n in (0..30)] # G. C. Greubel, Apr 19 2021

Formula

G.f.: (1+x^2)/(1 - 3*x+ 2*x^2 - x^3).
a(n) = term (1,1) in the 1 X 3 matrix [1,1,2].[3,1,0; -2,0,1; 1,0,0]^n. - Alois P. Heinz, Jul 24 2008
a(n) = A095263(n) + A095263(n-2). - G. C. Greubel, Apr 19 2021

Extensions

More terms from Ryan Propper, Sep 27 2005

A135364 First column of a triangle - see Comments lines.

Original entry on oeis.org

1, 2, 3, 7, 17, 40, 93, 216, 502, 1167, 2713, 6307, 14662, 34085, 79238, 184206, 428227, 995507, 2314273, 5380032, 12507057, 29075380, 67592058, 157132471, 365288677, 849193147, 1974134558, 4589306057, 10668842202
Offset: 0

Views

Author

Paul Curtz, Dec 09 2007

Keywords

Comments

...1;
...2,...1;
...3,...3,...1;
...7,...5,...4,...1;
..17,..10,...7,...5,...1;
..40,..24,..13,...9,...6,...1;
..93,..57,..31,..16,..11,...7,...1;
From the second, the sum of a row gives the first term of the following one. Diagonal differences are the first term upon. First column is a(n).

Crossrefs

Programs

  • Magma
    I:=[3,7,17]; [1,2] cat [n le 3 select I[n] else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..51]]; // G. C. Greubel, Apr 19 2021
    
  • Maple
    a:= n-> `if`(n=0, 1, (<<7|3|2>> .<<3|1|0>, <-2|0|1>, <1|0|0>>^(n-1))[1, 3]):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 24 2008
  • Mathematica
    LinearRecurrence[{3,-2,1}, {1,2,3,7,17}, 51] (* G. C. Greubel, Oct 11 2016; Apr 19 2021 *)
  • Sage
    @CachedFunction
    def A095263(n): return sum( binomial(n+j+2, 3*j+2) for j in (0..n//2) )
    def A135364(n): return 1 if n==0 else 2*A095263(n-1) -3*A095263(n-2) +2*A095263(n-3)
    [A135364(n) for n in (0..50)] # G. C. Greubel, Apr 19 2021

Formula

From Richard Choulet, Jan 06 2008: (Start)
a(n+1) = a(n) + a(n-1) + (n-1)*a(1) + (n-2)*a(2) + ... + 2*a(n-2) for n>=3.
O.g.f.: 1 + x*(2 - 3*x + 2*x^2) / (1 - 3*x + 2*x^2 - x^3).
a(n+3) = 3*a(n+2) - 2*a(n+1) + a(n). (End)
a(n) = A034943(n) + A034943(n+1). - R. J. Mathar, Apr 09 2008
a(0) = 1, a(n) = term (1,3) in the 1 X 3 matrix [7,3,2].[3,1,0; -2,0,1; 1,0,0]^(n-1) (n>0). - Alois P. Heinz, Jul 24 2008
a(n) = 2*A095263(n-1) -3*A095263(n-2) +2*A095263(n-3) with a(0) = 1. - G. C. Greubel, Apr 19 2021

Extensions

More terms from Richard Choulet, Jan 06 2008

A136303 Expansion of g.f. (1 +x^2)/((1-x)^2*(1 -3*x +2*x^2 -x^3)).

Original entry on oeis.org

1, 5, 17, 48, 123, 300, 714, 1679, 3925, 9149, 21296, 49537, 115192, 267824, 622653, 1447533, 3365149, 7823068, 18186475, 42278476, 98285586, 228486323, 531166317, 1234811937, 2870589548, 6673311137, 15513566304, 36064666240, 83840177305
Offset: 0

Views

Author

Richard Choulet, Mar 22 2008

Keywords

Comments

Previous name: Transform of 0 by the reciprocal transformation to T_{1,1} (see link).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x^2)/((1-x)^2*(1-3*x+2*x^2-x^3)) )); // G. C. Greubel, Apr 19 2021
    
  • Maple
    A136303:= n-> -2*(n+2) + add( (5*binomial(n+k+2, 3*k+2) - 4*binomial(n +k+1, 3*k+2) + 2*binomial(n+k, 3*k+2)), k=0..n/2 );
    seq(A136303(n), n=0..40); # G. C. Greubel, Apr 19 2021
  • Mathematica
    LinearRecurrence[{5,-9,8,-4,1},{1,5,17,48,123},40] (* Harvey P. Dale, Apr 01 2018 *)
  • Sage
    def A136303_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x^2)/((1-x)^2*(1-3*x+2*x^2-x^3)) ).list()
    A136303_list(40) # G. C. Greubel, Apr 19 2021

Formula

G.f.: f(z) = 1 +5*z + ... = (1+z^2)/((1-z)^2*(1-3*z+2*z^2-z^3)).
a(n+5) = 5*a(n+4) -9*a(n+3) +8*a(n+2) -4*a(n+1) +a(n) (n>=0). - Richard Choulet, Apr 07 2009
From G. C. Greubel, Apr 19 2021: (Start)
a(n) = -2*(n+2) + 5*A095263(n) - 4*A095263(n-1) + 2*A095263(n-2).
a(n) = -2*(n+2) + Sum_{k=0..floor(n/2)} (5*binomial(n+k+2, 3*k+2) - 4*binomial(n +k+1, 3*k+2) + 2*binomial(n+k, 3*k+2)). (End)

A136304 Expansion of g.f. (1-z)^2*(1-sqrt(1-4*z))/(2*z*(1 - 3*z + 2*z^2 - z^3)).

Original entry on oeis.org

1, 2, 5, 14, 40, 116, 344, 1047, 3273, 10500, 34503, 115838, 396244, 1377221, 4851665, 17285662, 62173297, 225424527, 822919439, 3021713140, 11151957809, 41340655956, 153853915410, 574593145517, 2152679745351, 8087904580883, 30466311814036, 115036597198845
Offset: 0

Views

Author

Richard Choulet, Mar 22 2008

Keywords

Comments

Previous name was: Transform of A000108 by the T_{0,0} transformation (see link).

Crossrefs

Programs

  • Magma
    A034943:= func< n | (&+[Binomial(n+j-1, 3*j): j in [0..Floor(n/2)]]) >;
    [(&+[A034943(j+1)*Catalan(n-j): j in [0..n]]): n in [0..35]]; // G. C. Greubel, Apr 19 2021
    
  • Mathematica
    A034943[n_]:= A034943[n]= Sum[Binomial[n+k-1, 3*k], {k, 0, n/2}];
    Table[Sum[A034943[j+1]*CatalanNumber[n-j], {j,0,n}], {n,0,35}] (* G. C. Greubel, Apr 19 2021 *)
  • Sage
    def A034943(n): return sum(binomial(n+j-1,3*j) for j in (0..n//2))
    [sum(A034943(j+1)*catalan_number(n-j) for j in (0..n)) for n in (0..35)] # G. C. Greubel, Apr 19 2021

Formula

G.f.: (1-z)^2*(1-sqrt(1-4*z))/(2*z*(1 - 3*z + 2*z^2 - z^3)).
Conjecture: (n+1)*a(n) + (-8*n+1)*a(n-1) + 3*(7*n-8)*a(n-2) + (-23*n+49)*a(n-3) + (13*n-32)*a(n-4) + 2*(-2*n+7)*a(n-5) = 0. - R. J. Mathar, Feb 29 2016
a(n) = Sum_{j=0..n} A034943(j+1)*A000108(n-j). - G. C. Greubel, Apr 19 2021

Extensions

New name using g.f., Joerg Arndt, Apr 20 2021

A136305 Expansion of g.f. (3 -x +2*x^2)/(1 -3*x +2*x^2 -x^3).

Original entry on oeis.org

3, 8, 20, 47, 109, 253, 588, 1367, 3178, 7388, 17175, 39927, 92819, 215778, 501623, 1166132, 2710928, 6302143, 14650705, 34058757, 79177004, 184064203, 427897358, 994740672, 2312491503, 5375890523, 12497429235, 29052998162, 67540026539, 157011512528
Offset: 0

Views

Author

Richard Choulet, Mar 22 2008

Keywords

Comments

Previous name: Transform of A000027 by the T_{1,2} transformation (see link).

Crossrefs

Programs

  • Magma
    [n le 3 select 2^(n-1)*(n+2) else 3*Self(n-1) - 2*Self(n-2) +Self(n-3): n in [1..41]]; // G. C. Greubel, Apr 19 2021
    
  • Mathematica
    LinearRecurrence[{3,-2,1}, {3,8,20}, 40] (* G. C. Greubel, Apr 19 2021 *)
    CoefficientList[Series[(3-x+2x^2)/(1-3x+2x^2-x^3),{x,0,40}],x] (* Harvey P. Dale, Oct 15 2021 *)
  • Sage
    @CachedFunction
    def a(n): return 2^n*(n+3) if n<3 else sum((-1)^j*(3-j)*a(n-j-1) for j in (0..2))
    [a(n) for n in (0..40)] # G. C. Greubel, Apr 19 2021

Formula

G.f.: f(z) = 3 +8*z + ... = (3 -z +2*z^2)/(1 -3*z +2*z^2 -z^3).
a(n+3) = 3*a(n+2) -2*a(n+1) +a(n) (n>=0). - Richard Choulet, Apr 07 2009

A137234 Expansion of g.f. 1/((1-x)^2*(1 - 3*x + 2*x^2 - x^3)).

Original entry on oeis.org

1, 5, 16, 43, 107, 257, 607, 1422, 3318, 7727, 17978, 41810, 97214, 226014, 525439, 1221519, 2839710, 6601549, 15346765, 35676927, 82938821, 192809396, 448227496, 1042002541, 2422362052, 5631308596, 13091204252, 30433357644, 70748973053
Offset: 0

Views

Author

Richard Choulet, Apr 05 2008

Keywords

Comments

Previous name: Transform of A000292 without the initial 0 by the T_{0,0} transformation (see link).
Partial sums of A137229. - R. J. Mathar, Nov 04 2008

Crossrefs

Programs

  • Magma
    I:=[1,5,16,43,107]; [n le 5 select I[n] else 5*Self(n-1) -9*Self(n-2) +8*Self(n-3) -4*Self(n-4) +Self(n-5): n in [1..41]]; // G. C. Greubel, Apr 19 2021
    
  • Mathematica
    LinearRecurrence[{5,-9,8,-4,1}, {1,5,16,43,107}, 41] (* G. C. Greubel, Apr 19 2021 *)
    CoefficientList[Series[1/((1-x)^2(1-3x+2x^2-x^3)),{x,0,30}],x] (* Harvey P. Dale, Jun 07 2021 *)
  • Sage
    @CachedFunction
    def A095263(n): return sum(binomial(n+j+2, 3*j+2) for j in (0..n//2))
    def A137234(n): return -(n+3) + sum( (-1)^j*(4-j)*A095263(n-j) for j in (0..2))
    [A137234(n) for n in (0..40)] # G. C. Greubel, Apr 19 2021

Formula

O.g.f: 1/((1-z)^2*(1 - 3*z + 2*z^2 - z^3)).
a(n) = -(n+3) + Sum_{j=0..2} (-1)^j*(4-j)*A095263(n-j). - G. C. Greubel, Apr 19 2021
Showing 1-7 of 7 results.