OFFSET
0,2
COMMENTS
Period 6: repeat [1, -3, 4, -3, 1, 0].
The unsigned sequence is the r=3 member in the r-family of sequences S_r(n) defined in A092184 where more information can be found. |a(n)| = 2-2*T(n,1/2), with twice the Chebyshev polynomials of the first kind 2*T(n,x=1/2) = A057079(n+1) = S(n+1,1) + S(n,1) with S(n,1)= A010892(n).
Working with an offset of 1, this sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. Case P1 = -3, P2 = 2, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 25 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
H. C. Williams and R. K. Guy, Some fourth-order linear divisibility sequences, Intl. J. Number Theory 7 (5) (2011) 1255-1277.
H. C. Williams and R. K. Guy, Some Monoapparitic Fourth Order Linear Divisibility Sequences Integers, Volume 12A (2012) The John Selfridge Memorial Volume.
Index entries for linear recurrences with constant coefficients, signature (-2,-2,-1).
FORMULA
abs(a(n)) = 2 + 2*cos(Pi*n/3 - 2*Pi/3). - Paul Barry, Mar 14 2004
Euler transform of finite sequence [-3, 1, 1]. - Michael Somos, Sep 17 2004
a(n) = (n+1)*(Sum_{k=0..floor((n+1)/2)} (-1)^k*binomial(n-k+1, k)*(-1)^(n-2k+1)/(n-k+1)) + 2*(-1)^n; a(n) = 2*T(n+1, -1/2) + 2(-1)^n. - Paul Barry, Dec 12 2004
From Peter Bala, Mar 25 2014: (Start)
The following formulas assume an offset of 1.
Let {u_j(n)}, j = 0 or j = 1, be two Lucas sequences in the quadratic integer ring Z[w], where w = exp(2*Pi*i/3), defined by the recurrences u_j(0) = 0, u_j(1) = 1 and u_j(n) = (-1)^j*sqrt(3)*u(n-1) - u(n-2) for n >= 2. Then a(n) = u_0(n)*u_1(n).
Equivalently, a(n) = U(n-1,sqrt(3)/2)*U(n-1,-sqrt(3)/2), where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = - ( ((sqrt(3) + i)/2)^n - ((sqrt(3) - i)/2)^n )*( ((-sqrt(3) + i)/2)^n - ((-sqrt(3) - i)/2)^n ) = w^n + w^(2*n) - 2*(-1)^n = 2*cos(2*n*Pi/3) - 2*(-1)^n.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, -1/2; 1, -3/2] and T(n,x) denotes the Chebyshev polynomial of the first kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)
a(n) = a(n+6) = a(-2-n) for all n in Z. - Michael Somos, Aug 05 2015
a(n) = (-1)^n * A254745(n). - Michael Somos, Jul 16 2017
EXAMPLE
G.f. = 1 - 3*x + 4*x^2 - 3*x^3 + x^4 + x^6 - 3*x^7 + 4*x^8 - 3*x^9 + x^10 + ...
MATHEMATICA
a[ n_] := {-3, 4, -3, 1, 0, 1}[[Mod[ n, 6, 1]]]; (* Michael Somos, Aug 05 2015 *)
CoefficientList[Series[(1-x)/(1+2x+2x^2+x^3), {x, 0, 120}], x] (* or *) PadRight[ {}, 120, {1, -3, 4, -3, 1, 0}] (* or *) LinearRecurrence[{-2, -2, -1}, {1, -3, 4}, 120] (* Harvey P. Dale, Jan 06 2016 *)
PROG
(PARI) Vec((1-x)/(1+2*x+2*x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
(PARI) {a(n) = [1, -3, 4, -3, 1, 0][n%6 + 1]}; /* Michael Somos, Aug 05 2015 */
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
EXTENSIONS
Chebyshev comment and related formulas from Wolfdieter Lang, Sep 10 2004
STATUS
approved