OFFSET
0,2
COMMENTS
Partial sums of A000325.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
a(n) = 2^(n+1) - (n^2 + n + 2)/2.
a(n) = 1 + n + n*(n-1)/2 + 2*Sum_{k=3..n} C(n, k).
O.g.f.: (1-3*x+3*x^2)/((1-2*x)*(1-x)^3). - R. J. Mathar, Apr 07 2008
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4). - R. J. Mathar, Apr 07 2008
a(n) = Sum_{i=0..n} (2^i - i). - Ctibor O. Zizka, Oct 15 2010
a(n) = A000225(n+1) - binomial(n+1,2). - G. C. Greubel, Mar 18 2023
MAPLE
MATHEMATICA
LinearRecurrence[{5, -9, 7, -2}, {1, 2, 4, 9}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2012 *)
PROG
(Sage) [2^(n+1)-1-binomial(n+1, 2) for n in range(52)] # Zerinvary Lajos, May 29 2009
(Magma) [2^(n+1)-1-Binomial(n+1, 2): n in [0..50]]; // G. C. Greubel, Mar 18 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jun 06 2003
STATUS
approved