OFFSET
0,3
COMMENTS
a(n+1)-2*a(n) defines a periodic sequence with period length 6: 1, 0, -2, 0, 1, 3 (repeat).
The sequence a(n) and its iterated differences in successive lines are:
..0, 1, .2, .2, .4, .9, 21, 43, 86, 170, 340,...
..1, 1, .0, .2, .5, 12, 22, 43, 84, 170, 341,...
..0,-1, .2, .3, .7, 10, 21, 41, 86, 171, 343,...
.-1, 3, .1, .4, .3, 11, 20, 45, 85, 172, 339,...
..4,-2, .3, -1, .8, .9, 25, 40, 87, 167, 344,...
.-6, 5, -4, .9, .1, 16, 15, 47, 80, 177, 337,...
.11,-9, 13, -8, 15, -1, 32, 33, 97, 160, 351,...
-20,22,-21, 23,-16, 33, .1, 64, 63, 191, 320,...
On the main diagonal of this array we recognize the powers of 2, A131577.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,3,-2).
FORMULA
a(n) = 2^n/3 - 1/2 + (-1)^n/6 + A010892(n-1). - R. J. Mathar, Oct 06 2009
G.f.: x*(1 - x - 2*x^2 + 3*x^3)/((x-1) * (2*x-1) * (1+x) * (x^2-x+1)). - R. J. Mathar, Oct 06 2009
MATHEMATICA
LinearRecurrence[{3, -2, -1, 3, -2}, {0, 1, 2, 2, 4}, 40] (* Harvey P. Dale, Mar 13 2014 *)
CoefficientList[Series[x (1 - x - 2 x^2 + 3 x^3)/((x - 1) (2 x - 1) (1 + x) (x^2 - x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 15 2014 *)
PROG
(PARI) concat(0, Vec(x*(1-x-2*x^2+3*x^3)/((x-1)*(2*x-1)*(1+x)*(x^2-x+1))+O(x^50))) \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 04 2009
EXTENSIONS
Extended by R. J. Mathar, Oct 06 2009
STATUS
approved