OFFSET
0,2
COMMENTS
Sometimes confused with A002717.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (3, -2).
FORMULA
a(n) = 3(a(n-1) - a(n-2) + a(n-3) - ... ((-1)^(n+1))*a(0))+1;
a(n) = (2^(n-3))*a(3) + (2^(n-2)) - 2 for n > 3.
From R. J. Mathar, Jul 15 2009: (Start)
G.f.: -(1+x)*(x^2-x-1)/((-1+x)*(-1+2*x)).
a(n) = 15*2^(n-2) - 2, n > 1. (End)
PROG
(PARI) { a=-1; for (n=0, 200, a=2*a + 2; if (n<3, a++); write("b060182.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 02 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brian Wallace (wallacebrianedward(AT)yahoo.co.uk), Mar 19 2001
EXTENSIONS
Simpler formula and more terms from Larry Reeves (larryr(AT)acm.org), Mar 30 2001
Edited by N. J. A. Sloane at the suggestion of Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Sep 16 2007
STATUS
approved