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

A005021 Random walks (binomial transform of A006054).

Original entry on oeis.org

1, 5, 19, 66, 221, 728, 2380, 7753, 25213, 81927, 266110, 864201, 2806272, 9112264, 29587889, 96072133, 311945595, 1012883066, 3288813893, 10678716664, 34673583028, 112584429049, 365559363741, 1186963827439, 3854047383798, 12514013318097, 40632746115136
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length 2n+5 in the path graph P_6 from one end to the other one. Example: a(1)=5 because in the path ABCDEF we have ABABCDEF, ABCBCDEF, ABCDCDEF, ABCDEDEF and ABCDEFEF. - Emeric Deutsch, Apr 02 2004
Since a(n) is the binomial transform of A006054 from formula (3.63) in the Witula-Slota-Warzynski paper, it follows that a(n)=A(n;1)*(B(n;-1)-C(n;-1))-B(n;1)*B(n;-1)+C(n;1)*(A(n;-1)-B(n;-1)+C(n;-1)), where A(n;1)=A077998(n), B(n;1)=A006054(n+1), C(n;1)=A006054(n), A(n;-1)=A121449(n), B(n+1;-1)=-A085810(n+1), C(n;-1)=A215404(n) and A(n;d), B(n;d), C(n;d), n in N, d in C, denote the quasi-Fibonacci numbers defined and discussed in comments in A121449 and in the cited paper. - Roman Witula, Aug 09 2012
From Wolfdieter Lang, Mar 30 2020: (Start)
With offset -4 this sequence 6, 1, 0, 0, 1, 5, ... appears in the formula for the n-th power of the 3 X 3 tridiagonal Matrix M_3 = Matrix([1,1,0], [1,2,1], [0,1,2]) from A332602: (M_3)^n = a(n-2)*(M_3)^2 - (6*a(n-3) - a(n-4))*M_3 + a(n-3)*1_3, with the 3 X 3 unit matrix 1_3, for n >= 0. Proof from Cayley-Hamilton: (M_3)^n = 5*(M_3)^3 - 6*M_3 + 1_3 (see A332602 for the characteristic polynomial Phi(3, x)), and the recurrence (M_3)^n = M_3*(M_3)^(n-1). For (M_3)^n[1,1] = 2*a(n-2) - 5*a(n-3) + a(n-4), for n >= 0, see A080937(n).
The formula for a(n) in terms of r = rho(7) = A160389 given below shows that a(n)/a(n-1) converges to rho(7)^2 = A116425 = 3.2469796... for n -> infinity. This is because r - 2/r = 0.692..., and r - 1 - 1/r = 0.137... .
(End)

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 3rd ed, Wiley, New York, 1968, p. 96.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Double partial sums of A060557. Bisection of A052547.

Programs

  • Magma
    I:=[1,5,19]; [n le 3 select I[n] else 5*Self(n-1)-6*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
    
  • Maple
    a:=k->sum(binomial(5+2*k,7*j+k-2),j=ceil((2-k)/7)..floor((7+k)/7))-sum(binomial(5+2*k,7*j+k-1),j=ceil((1-k)/7)..floor((6+k)/7)): seq(a(k),k=0..25);
    A005021:=-(z-1)*(z-5)/(-1+5*z-6*z**2+z**3); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence apart from the initial 1
  • Mathematica
    LinearRecurrence[{5,-6,1}, {1,5,19}, 50] (* Roman Witula, Aug 09 2012 *)
    CoefficientList[Series[1/(1 - 5 x + 6 x^2 - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 18 2015 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-5*x+6*x^2-x^3)) \\ G. C. Greubel, Apr 19 2018

Formula

G.f.: 1/(1-5x+6x^2-x^3). - Emeric Deutsch, Apr 02 2004
a(n) = 5*a(n-1) -6*a(n-2) +a(n-3). - Emeric Deutsch, Apr 02 2004
a(n) = Sum_{j=-infinity..infinity} (binomial(5+2*k, 7*j+k-2) - binomial(5+2*k, 7*j+k-1)) (a finite sum).
a(n-2) = 2^n*C(n;1/2)=(1/7)*((c(2)-c(4))*(c(4))^(2n) + (c(4)-c(1))*(c(1))^(2n) + (c(1)-c(2))*(c(2))^(2n)), where a(-2)=a(-1):=0, c(j):=2*cos(2Pi*j/7). This formula follows from the Binet formula for C(n;d)--one of the quasi-Fibonacci numbers (see comments in A121449 and the formula (3.17) in the Witula-Slota-Warzynski paper). - Roman Witula, Aug 09 2012
In terms of the algebraic number r = rho(7) = 2*cos(Pi/7) = A160389 of degree 3 the preceding formula gives a(n) = r^(2*(n+2))*(A1(r) + A2(r)*(r - 2/r)^(2*(n+1)) = A3(r)*(r - 1 - 1/r)^(2*(n+1)))/7, for n >= -4 (see a comment above for this offset), with A1(r) = -r^2 + 2*r + 1, A2(r) = -r^2 - r + 2, and A3(r) = 2*r^2 - r - 3. - Wolfdieter Lang, Mar 30 2020

Extensions

a(25)-a(26) from Vincenzo Librandi, Sep 18 2015

A215492 a(n) = 21*a(n-2) + 7*a(n-3), with a(0)=0, a(1)=3, and a(2)=6.

Original entry on oeis.org

0, 3, 6, 63, 147, 1365, 3528, 29694, 83643, 648270, 1964361, 14199171, 45789471, 311933118, 1060973088, 6871121775, 24463966674, 151720368891, 561841152579, 3357375513429, 12860706786396, 74437773850062, 293576471108319, 1653218198356074, 6686170310225133
Offset: 0

Views

Author

Roman Witula, Aug 13 2012

Keywords

Comments

We have a(n)=B(n;3), where B(n;d), n=1,2,..., d \in C, denote one of the quasi-Fibonacci numbers defined in the comments to A121449 and in the Witula-Slota-Warzynski paper. Its conjugate sequences A(n;3) and C(n;3) are discussed in A121458 and A215484 respectively. Similarly as in A121458 we deduce that each of the following elements a(3*n), a(3*n+1), a(3*n+2) is divided by 3*7^n for every n=0,1,... .

Crossrefs

Programs

  • Magma
    I:=[0,3,6]; [n le 3 select I[n] else 21*Self(n-2)+7*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
  • Mathematica
    LinearRecurrence[{0,21,7}, {0,3,6}, 50]
    CoefficientList[Series[(3 x + 6 x^2)/(1 - 21 x^2 - 7 x^3), {x, 0, 33}], x] (* Vincenzo Librandi, Sep 18 2015 *)
  • PARI
    concat(0,Vec((3+6*x)/(1-21*x^2-7*x^3)+O(x^99))) \\ Charles R Greathouse IV, Oct 01 2012
    

Formula

a(n) = (1/7)*((c(1)-c(4))*(1+3*c(1))^n + (c(2)-c(1))*(1+3*c(2))^n + (c(4)-c(2))*(1+3*c(4))^n), where c(j):=2*cos(2*Pi*j/7) (for the proof see Witula-Slota-Warzynski paper).
G.f.: (3*x+6*x^2)/(1-21*x^2-7*x^3).

A307466 Number of Catalan words of length n avoiding the pattern 210.

Original entry on oeis.org

1, 1, 2, 5, 14, 41, 121, 355, 1032, 2974, 8509, 24210, 68595, 193753, 546041, 1536358, 4317652, 12123685, 34021810, 95431301, 267601625, 750221859, 2102913404, 5893910702, 16517729313, 46288368894, 129710571239, 363467837569, 1018468044881, 2853791650010
Offset: 0

Views

Author

R. J. Mathar, Apr 09 2019

Keywords

Programs

  • Maple
    (1-5*x+7*x^2-x^3-x^4)/(1-2*x)/(1-4*x+3*x^2+x^3) ;
    taylor(%,x=0,30) ;
    gfun[seriestolist](%) ;

Formula

a(n) = A215404(n+2) -2*A215404(n+1) - A215404(n) -2^(n-1), n>0.
G.f.: (1-5*x+7*x^2-x^3-x^4)/(1-2*x)/(1-4*x+3*x^2+x^3) .

A322504 a(n) = -4*a(n-1) - 3*a(n-2) + a(n-3), a(0) = 1, a(1) = -2, a(2) = 4.

Original entry on oeis.org

1, -2, 4, -9, 22, -57, 153, -419, 1160, -3230, 9021, -25234, 70643, -197849, 554233, -1552742, 4350420, -12189221, 34152882, -95693445, 268125913, -751270435, 2105010556, -5898105006, 16526117921, -46305146110, 129744125671, -363534946433, 1018602262609, -2854060085466, 7996898607604
Offset: 0

Views

Author

Kai Wang, Jan 10 2019

Keywords

Comments

Let {X,Y,Z} be the roots of the cubic equation t^3 + at^2 + bt + c = 0 where {a, b, c} are integers.
Let {u, v, w} be three numbers such that {u + v + w, u*X + v*Y + w*Z, u*X^2 + v*Y^2 + w*Z^2} are integers.
Then {p(n) = u*X^n + v*Y^n + w*Z^n | n = 0, 1, 2, ...} is an integer sequence with the recurrence relation: p(n) = -a*p(n-1) - b*p(n-2) - c*p(n-3).
Let k = Pi/7.
This sequence has (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(8k)), 1/(sqrt(7)*tan(2k)), 1/(sqrt(7)*tan(4k))).
A215404: (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(2k)), 1/(sqrt(7)*tan(4k)), 1/(sqrt(7)*tan(8k))).
A136776: (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(4k)), 1/(sqrt(7)*tan(8k)), 1/(sqrt(7)*tan(2k))).
X = (sin(2k)*sin(2k))/(sin(4k)*sin(8k)), Y = (sin(4k)*sin(4k))/(sin(8k)*sin(2k)), Z = (sin(8k)*sin(8k))/(sin(2k)*sin(4k)).

Crossrefs

Programs

  • Magma
    I:=[1,-2,4]; [n le 3 select I[n] else -4*Self(n-1) - 3*Self(n-2) + Self(n-3): n in [1..31]]; // Vincenzo Librandi, Jan 13 2019
  • Mathematica
    LinearRecurrence[{-4,-3,1},{1,-2,4},50] (* Stefano Spezia, Jan 11 2019 *)
    RecurrenceTable[{a[0]==1, a[1]==-2, a[2]==4, a[n]==-4 a[n-1]-3 a[n-2]+a[n-3]}, a, {n, 30}] (* Vincenzo Librandi, Jan 13 2019 *)
  • PARI
    Vec((1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3) + O(x^30)) \\ Colin Barker, Jan 11 2019
    

Formula

G.f.: (1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3). - Colin Barker, Jan 11 2019

A290186 Expansion of (1+x)/ ((1+x)^3-7*x).

Original entry on oeis.org

1, 5, 17, 52, 152, 435, 1232, 3471, 9753, 27367, 76738, 215098, 602811, 1689212, 4733317, 13262821, 37162121, 104126704, 291757632, 817488295, 2290553580, 6417991803, 17982818177, 50386743719, 141180528542, 395579064834, 1108387929991, 3105633996920, 8701793132873, 24381882610741
Offset: 0

Views

Author

R. J. Mathar, Jul 23 2017

Keywords

Crossrefs

Pairwise sums of A215404.

Programs

  • Mathematica
    CoefficientList[Series[(1+x)/((1+x)^3-7x),{x,0,30}],x] (* Harvey P. Dale, Sep 12 2017 *)

Formula

a(n) = A215404(n+2)+A215404(n+1).
Showing 1-5 of 5 results.