OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1074
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
Recurrence: {-2*a(n)+a(n+1)-1=0, a(0)=1, a(1)=3, a(2)=8}.
a(n) = 9*2^(n-2) - 1 for n > 1. - Brad Clardy, Sep 23 2011
MAPLE
spec := [S, {S=Prod(Union(Prod(Z, Z), Sequence(Z)), Sequence(Union(Z, Z)))}, unlabeled ]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
a[0] := 1; a[1] := 3; a[2] := 8; a[n_] := 2*a[n - 1] + 1; Table[a[n], {n, 0, 12}] (* L. Edson Jeffery, Dec 18 2014 *)
CoefficientList[ Series[(1 + x^2 - x^3)/((1 - x) (1 - 2 x)), {x, 0, 30}], x] (* Robert G. Wilson v, Jul 29 2015 *)
LinearRecurrence[{3, -2}, {1, 3, 8, 17}, 40] (* Harvey P. Dale, Feb 11 2018 *)
PROG
(Magma) [Floor(9*2^(n-2) - 1): n in [0..40]]; // Vincenzo Librandi, Sep 24 2011
(PARI) Vec((1+x^2-x^3)/((1-x)*(1-2*x)) + O(x^50)) \\ Michel Marcus, Jul 30 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 06 2000
STATUS
approved