OFFSET
0,4
COMMENTS
Coefficient of x in the polynomial C(n,0)+C(n+1,1)x+C(n+2,2)x(x-1)/2.
a(n) is essentially the case 1 of the polygonal numbers. The polygonal numbers are defined as P_k(n) = Sum_{i=1..n} ((k-2)*i-(k-3)). Thus P_1(n) = n*(3-n)/2 and a(n) = P_1(n+1). See A005563 for the case k=0. - Peter Luschny, Jul 08 2011
This is the case k=-1 of the formula (k*m*(m+1)-(-1)^k+1)/2. See similar sequences listed in A262221. - Bruno Berselli, Sep 17 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Paul Barry, Centered polygon numbers, heptagons and nonagons, and the Robbins numbers, arXiv:2104.01644 [math.CO], 2021.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2*(C(n+1, 1)-C(n+2, 2)) = (n+1)*(2-n)/2.
G.f.: (1-2*x)/(1-x)^3. - R. J. Mathar, Jun 11 2009
If we define f(n,i,a) = Sum_{k=0..n-i} (binomial(n,k)*stirling1(n-k,i)*Product_{j=0..k-1} (-a-j)), then a(n) = f(n,n-1,2), for n>=3. - Milan Janjic, Dec 20 2008
E.g.f.: exp(x)*(1-x^2/2). - Zerinvary Lajos, Apr 05 2009, R. J. Mathar, Jun 11 2009
a(n) = - A214292(n,1) for n > 0. - Reinhard Zumkeller, Jul 12 2012
Recurrence: a(0)=1, a(n+1) = a(n) - n. Also a(n)=(n+1)-Sum[k=1..n](k). Also a(n) = A000027(n+1) - A000217(n). Also, for n>1, a(n) = - A000096(n-2). - Stanislav Sykora, Feb 19 2014
Sum_{n>=3} 1/a(n) = -11/9. - Amiram Eldar, Sep 26 2022
EXAMPLE
a(5) = 6-(1+2+3+4+5). - Stanislav Sykora, Feb 19 2014
MAPLE
G(x):=exp(x)*(x-x^2/2): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1], x) od: x:=0: seq(f[n], n=1..54 ); # Zerinvary Lajos, Apr 05 2009
MATHEMATICA
f[n_] := n; lst = {}; Do[a = f[n]; Do[a -= f[m], {m, n - 1, 1, -1}]; AppendTo[lst, a], {n, 46}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 10 2010 *)
FoldList[#1 - #2 &, 1, Range[0, 44]] (* Arkadiusz Wesolowski, May 26 2013 *)
LinearRecurrence[{3, -3, 1}, {1, 1, 0}, 60] (* Harvey P. Dale, Nov 29 2019 *)
PROG
(Magma) [(n+1)*(2-n)/2: n in [0..80]]; // Vincenzo Librandi, Jul 08 2011
(PARI) a(n)=(n+1)*(2-n)/2;
KEYWORD
sign,easy
AUTHOR
Paul Barry, Mar 01 2003
EXTENSIONS
Lajos e.g.f. adapted to offset zero by R. J. Mathar, Jun 11 2009
STATUS
approved