A131292 a(2n+1)=3a(2n)-3a(2n-1)+2a(2n-2), a(2n+2)=3a(2n+1)-3a(2n), a(0)=a(1)=a(2)=1.
1, 1, 1, 2, 3, 5, 6, 9, 9, 12, 9, 9, 0, -9, -27, -54, -81, -135, -162, -243, -243, -324, -243, -243, 0, 243, 729, 1458, 2187, 3645, 4374, 6561, 6561, 8748, 6561, 6561, 0, -6561, -19683, -39366, -59049, -98415, -118098, -177147, -177147, -236196, -177147, -177147, 0, 177147, 531441, 1062882, 1594323
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 3, 0, -3).
Crossrefs
Cf. A131665 (0, 0, 1, 3, 6, 11).
Cf. A057083 (bisection). - R. J. Mathar, Jul 17 2009
Programs
-
Maple
A131292 := proc(n) option remember ; if n <= 2 then 1; elif n mod 2 = 1 then 3*(A131292(n-1)-A131292(n-2))+2*A131292(n-3) ; else 3*(A131292(n-1)-A131292(n-2)) ; fi ; end: seq(A131292(n),n=0..80) ; # R. J. Mathar, Oct 18 2007
-
Mathematica
Join[{1, 1},LinearRecurrence[{0, 3, 0, -3},{1, 2, 3, 5},51]] (* Ray Chandler, Sep 23 2015 *)
Formula
G.f.: (2*x^3-x^2-x+1)*(1+x)^2/(1-3*x^2+3*x^4). - R. J. Mathar, Jul 17 2009
Extensions
More terms from R. J. Mathar, Oct 18 2007
Comments