OFFSET
1,1
LINKS
FORMULA
a(n) = A003945(n-1) + 1.
a(n) = 3*2^(n-2) + 1 for n>1. - Ralf Stephan, May 18 2007
a(n) = A004119(n-1), n>1. - R. J. Mathar, Jun 11 2010
G.f.: x*(2-2*x-x^2)/(1-3*x+2*x^2). a(n) = 3*a(n-1)-2*a(n-2), n>3. - Colin Barker, Jan 29 2012
MATHEMATICA
a[1] = 2; a[2] = 4; a[n_] := a[n] = 2*a[n - 1] - 1; Table[a[n], {n, 1, 32}]
Join[{2}, NestList[2#-1&, 4, 40]] (* or *) LinearRecurrence[{3, -2}, {2, 4, 7}, 40] (* Harvey P. Dale, Dec 04 2018 *)
PROG
(PARI) Vec(x*(2-2*x-x^2)/(1-3*x+2*x^2) + O(x^50)) \\ Michel Marcus, Jan 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Mar 19 2005
STATUS
approved