OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(n+1) = 2*a(n) + 1.
G.f.: (20-19*x)/((1-x)*(1-2*x)). - Vincenzo Librandi, Jul 06 2012
a(n) = 3*a(n-1) - 2*a(n-2). - Vincenzo Librandi, Jul 06 2012
a(n) + a(n-1)^2 = (a(n-1) + 1)^2. - Vincenzo Librandi, Jun 11 2014
MAPLE
MATHEMATICA
CoefficientList[Series[(20-19*x)/((1-x)*(1-2*x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 06 2012 *)
PROG
(BASIC) for j = 0 to 30 : print str$((21*2^j)-1)+", "; : next j [Jeremy Gardiner, Oct 23 2011]
(Magma) I:=[20, 41]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Dec 07 2009
EXTENSIONS
Edited by Jon E. Schoenfield, Jun 23 2010
Offset changed to 0 and first formula corrected by Jeremy Gardiner, Oct 23 2011
STATUS
approved