OFFSET
0,4
COMMENTS
1, followed by period 6: repeat [1, -1, -2, -1, 1, 2]. - Joerg Arndt, Aug 28 2024
A Chebyshev transform of 1/(1-x): if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
Transform of 1/(1+x) under the mapping g(x)->((1+x)/(1-x))g(x/(1-x)^2). - Paul Barry, Dec 01 2004
Multiplicative with a(p^e) = -1 if p = 2; -2 if p = 3; 1 otherwise. - David W. Wilson, Jun 10 2005
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Michael Somos, Rational Function Multiplicative Coefficients
Index entries for linear recurrences with constant coefficients, signature (1,-1).
FORMULA
From Paul Barry, Dec 01 2004: (Start)
G.f.: (1-x^2)/(1-x+x^2).
a(n) = a(n-1) - a(n-2), n>2.
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)/(n-k).
a(n) = Sum_{k=0..n} binomial(n+k, 2k)*(2n/(n+k))*(-1)^k, n>1. (End)
Moebius transform is length 6 sequence [1, -2, -3, 0, 0, 6].
Euler transform of length 6 sequence [1, -2, -1, 0, 0, 1].
a(n) = a(-n). a(n) = c_6(n) if n>1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
a(n) = A087204(n), n>0. - R. J. Mathar, Sep 02 2008
a(n) = A057079(n+1), n>0. Dirichlet g.f. zeta(s) *(1-2^(1-s)-3^(1-s)+6^(1-s)). - R. J. Mathar, Apr 11 2011
EXAMPLE
G.f. = 1 + x - x^2 - 2*x^3 - x^4 + x^5 + 2*x^6 + x^7 - x^8 - 2*x^9 - x^10 + ...
MATHEMATICA
CoefficientList[Series[(1 - x^2)/(1 - x + x^2), {x, 0, 50}], x] (* G. C. Greubel, May 03 2017 *)
LinearRecurrence[{1, -1}, {1, 1, -1}, 80] (* Harvey P. Dale, Mar 25 2019 *)
PROG
(PARI) {a(n) = - (n == 0) + [2, 1, -1, -2, -1, 1][n%6 + 1]}; /* Michael Somos, Mar 21 2011 */
CROSSREFS
KEYWORD
easy,sign,mult
AUTHOR
Paul Barry, Oct 31 2004
STATUS
approved