OFFSET
0,5
REFERENCES
Martin Gardner, Mathematical Circus, Random House, New York, 1981, p. 165.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,-3,3,-1).
FORMULA
O.g.f.: (-1+x-2*x^2+x^3)/(1-x+3*x^2-3*x^3+x^4). - R. J. Mathar, Aug 25 2008
MATHEMATICA
LinearRecurrence[{1, -3, 3, -1}, {-1, 0, 1, -1}, 51] (* G. C. Greubel, Sep 16 2024 *)
PROG
(PARI) my(x='x+O('x^99)); Vec((1-x+2*x^2-x^3)/(-1+x-3*x^2+3*x^3-x^4)) \\ Altug Alkan, Dec 17 2017
(Magma)
I:=[-1, 0, 1, -1]; [n le 4 select I[n] else Self(n-1) -3*Self(n-2) +3*Self(n-3) -Self(n-4): n in [1..50]]; // G. C. Greubel, Sep 16 2024
(SageMath)
def A141577_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (-1+x-2*x^2+x^3)/(1-x+3*x^2-3*x^3+x^4) ).list()
A141577_list(50) # G. C. Greubel, Sep 16 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Matt Wynne (mattwyn(AT)verizon.net), Aug 18 2008
EXTENSIONS
Corrected and extended by R. J. Mathar, Aug 25 2008
STATUS
approved