OFFSET
0,3
COMMENTS
A Chebyshev transform of x/(1-x)^2: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
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 (2,-3,2,-1).
FORMULA
Euler transform of length 6 sequence [ 2, -3, -2, 0, 0, 2]. - Michael Somos, Mar 19 2011
a(n) is multiplicative with a(2^e) = -(-2)^e if e>0, a(3^e) = 0^e, a(p^e) = p^e if p == 1 (mod 6), a(p^e) = (-p)^e if p == 5 (mod 6). - Michael Somos, Mar 19 2011
G.f.: x*(1 - x^2)^3 *(1 - x^3)^2 / ((1 - x)^2 *(1 - x^6)^2) = x *(1 + x)^2 *(1 - x^2) / (1 + x^3)^2. - Michael Somos, Mar 19 2011
a(3*n) = 0, a(3*n + 1) = (-1)^n * (3*n + 1), a(3*n + 2) = (-1)^n * (3*n + 2). a(-n) = a(n). - Michael Somos, Mar 19 2011
G.f.: x(1-x^2)/(1-x+x^2)^2.
a(n) = 2*a(n-1) -3*a(n-2) +2*a(n-3) -a(n-4).
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k,k)*(n-2k)/(n-k).
EXAMPLE
x + 2*x^2 - 4*x^4 - 5*x^5 + 7*x^7 + 8*x^8 - 10*x^10 - 11*x^11 + 13*x^13 + ...
MATHEMATICA
LinearRecurrence[{2, -3, 2, -1}, {0, 1, 2, 0}, 50] (* G. C. Greubel, Aug 08 2017 *)
PROG
(Sage) [lucas_number1(n, 2, 1)*lucas_number1(n, 1, 1) for n in range(0, 88)] # Zerinvary Lajos, Jul 06 2008
(PARI) {a(n) = n * (-1)^(n\3) * sign( n%3)} /* Michael Somos, Mar 19 2011 */
(PARI) {a(n) = local(A, p, e); if( abs(n)<1, 0, A = factor(abs(n)); prod( k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p==2, -(-2)^e, (kronecker( -12, p) * p)^e))))} /* Michael Somos, Mar 19 2011 */
CROSSREFS
KEYWORD
easy,sign,mult
AUTHOR
Paul Barry, Oct 31 2004
STATUS
approved