OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4).
FORMULA
a(n+1) - 2*a(n) = -A131577(n).
G.f.: (1 - 2*x - x^2)/(1-2*x)^2. - R. J. Mathar, Feb 11 2010
a(n) = 4*a(n-1) - 4*a(n-2), n>2.
E.g.f.: (1/4)*((5-2*x)*exp(2*x) - 1). - G. C. Greubel, Apr 21 2022
a(n) = 4^n*A045891(1-n) if n>1. - Michael Somos, Apr 22 2022
EXAMPLE
G.f. = 1 + 2*x + 3*x^2 + 4*x^3 + 4*x^4 - 16*x^6 - 64*x^7 + ... - Michael Somos, Apr 22 2022
MATHEMATICA
Table[2^(n-2)*(5-n) -(1/4)*Boole[n==0], {n, 0, 40}] (* G. C. Greubel, Apr 21 2022 *)
PROG
(SageMath) [2^(n-2)*(5-n) -(1/4)*bool(n==0) for n in (1..40)] # G. C. Greubel, Apr 21 2022
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jan 27 2010
EXTENSIONS
Definition replaced with closed form by R. J. Mathar, Feb 11 2010
STATUS
approved