OFFSET
0,2
LINKS
FORMULA
a(n) = (-1)^n*A104771(n).
G.f.: (1+x+x^2)/(1-x+x^3).
EXAMPLE
a(3) = 2 because 2 = 3 - 1 where the 1, 3 on the right of the equals sign are the first and third terms of the series.
MATHEMATICA
LinearRecurrence[{1, 0, -1}, {1, 2, 3}, 80] (* Harvey P. Dale, Apr 13 2012 *)
PROG
(Python)
series = [1, 2, 3]
for i in range(2, 30):
series.append(series[i] - series[i - 2])
print(series)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Ben Paul Thurston, Sep 06 2009
EXTENSIONS
Offset corrected and recurrence simplified by R. J. Mathar, Sep 08 2009
More terms from Harvey P. Dale, Apr 13 2012
STATUS
approved