OFFSET
0,5
COMMENTS
First column of number triangle A105810.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-2,-1).
FORMULA
a(n) = (-1)^(n+1)*(n-2) - 0^n.
E.g.f.: exp(-x)*(2 + x) - 1. - Stefano Spezia, Dec 29 2024
MATHEMATICA
CoefficientList[Series[(1+x-x^2)/(1+x)^2, {x, 0, 70}], x] (* or *) LinearRecurrence[ {-2, -1}, {1, -1, 0}, 70] (* Harvey P. Dale, Jun 16 2016 *)
PROG
(PARI) a(n)=-0^n-(-1)^n*(n-2) \\ Charles R Greathouse IV, Sep 02 2015
(Magma)
A105811:= func< n | (-1)^(n+1)*(n-2) - 0^n >;
[A105811(n): n in [0..70]]; // G. C. Greubel, Dec 01 2025
(SageMath)
def A105811(n): return (-1)**(n+1)*(n-2) - int(n==0)
print([A105811(n) for n in range(71)]) # G. C. Greubel, Dec 01 2025
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 04 2005
STATUS
approved
