OFFSET
0,2
COMMENTS
A subsequence of the triangular numbers A000217.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Alice V. Kleeva, Grid for this sequence
Alice V. Kleeva, Illustration of initial terms
Robert Munafo, Sequence A169720, and two others by Alice V. Kleeva
Robert Munafo, Sequence A169720, and two others by Alice V. Kleeva [Cached copy, in pdf format, included with permission]
Index entries for linear recurrences with constant coefficients, signature (7,-14,8).
FORMULA
G.f.: (1 + 3*x - x^2)/((1-x)*(1-2*x)*(1-4*x)). - Paul D. Hanna, Apr 29 2010
a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3). - Vincenzo Librandi, Dec 03 2012
a(n) = (3*A169726(n)-1)/2. - L. Edson Jeffery, Dec 03 2012
MATHEMATICA
CoefficientList[Series[(1 + 3*x - x^2)/((1-x)*(1-2*x)*(1-4*x)), {x, 0, 30}], x] (* or *) LinearRecurrence[{7, -14, 8}, {1, 10, 55}, 30] (* Vincenzo Librandi, Dec 03 2012 *)
PROG
(PARI) a(n)=polcoeff((1+3*x-x^2)/((1-x)*(1-2*x)*(1-4*x)+x*O(x^n)), n) \\ Paul D. Hanna, Apr 29 2010
(Magma) I:=[1, 10, 55]; [n le 3 select I[n] else 7*Self(n-1)-14*Self(n-2)+8*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 03 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alice V. Kleeva (alice27353(AT)gmail.com), Jan 19 2010
STATUS
approved