OFFSET
0,5
COMMENTS
Diagonal sums of triangle A123110. - Philippe Deléham, Oct 08 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
G.f.: (1 -x +x^3)/(1 -x -x^2 +x^3).
a(n) = A110654(n-1). - R. J. Mathar, Jun 18 2008
From G. C. Greubel, Jul 21 2021: (Start)
a(n) = (1/4)*(2*n - 1 + (-1)^n) + [n=0].
E.g.f.: (1/2)*(2 + x*cosh(x) + (x-1)*sinh(x)). (End)
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {1, 0, 1, 1}, 90] (* Harvey P. Dale, Aug 10 2020 *)
PROG
(Magma) I:=[0, 1, 1]; [1] cat [n le 3 select I[n] else Self(n-1) +Self(n-2) -Self(n-3): n in [1..31]]; // G. C. Greubel, Jul 21 2021
(Sage) [(2*n - 1 + (-1)^n)/4 + bool(n==0) for n in (0..90)] # G. C. Greubel, Jul 21 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Sep 28 2006
STATUS
approved