OFFSET
0,1
COMMENTS
Multiplicative with a(p^e) = (-1)^(e+1) if p = 2, 0 if p = 5, 1 if p == 1 or 9 (mod 10), (-1)^e if p == 3 or 7 (mod 10). - David W. Wilson, Jun 10 2005
This sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. Case P1 = 1, P2 = -1, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 24 2014
From Peter Bala, Mar 24 2014: (Start)
This is the particular case P1 = 1, P2 = -1, Q = 1 of the following results:
Let P1, P2 and Q be integers. Let alpha and beta denote the roots of the quadratic equation x^2 - 1/2*P1*x + 1/4*P2 = 0. Let T(n,x;Q) denote the bivariate Chebyshev polynomial of the first kind defined by T(n,x;Q) = 1/2*( (x + sqrt(x^2 - Q))^n + (x - sqrt(x^2 - Q))^n ) (when Q = 1, T(n,x;Q) reduces to the ordinary Chebyshev polynomial of the first kind T(n,x)). Then we have
1) The sequence A(n) := ( T(n,alpha;Q) - T(n,beta;Q) )/(alpha - beta) is a linear divisibility sequence of the fourth order.
2) A(n) belongs to the 3-parameter family of fourth-order divisibility sequences found by Williams and Guy.
3) The o.g.f. of the sequence A(n) is the rational function x*(1 - Q*x^2)/(1 - P1*x + (P2 + 2*Q)*x^2 - P1*Q*x^3 + Q^2*x^4).
4) The o.g.f. is the Chebyshev transform of the rational function x/(1 - P1*x + P2*x^2), where the Chebyshev transform takes the function A(x) to the function (1 - Q*x^2)/(1 + Q*x^2)*A(x/(1 + Q*x^2)).
5) Let q = sqrt(Q) and set a = sqrt( q + (P2)/(4*q) + (P1)/2 ) and b = sqrt( q + (P2)/(4*q) - (P1)/2 ). Then the o.g.f. of the sequence A(n) is the Hadamard product of the rational functions x/(1 - (a + b)*x + q*x^2) and x/(1 - (a - b)*x + q*x^2). Thus A(n) is the product of two (usually, non-integer) Lucas-type sequences.
6) A(n) = the bottom left entry of the 2 X 2 matrix 2*T(n,1/2*M;Q), where M is the 2 X 2 matrix [0, -P2; 1, P1].
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Tian-Xiao He, Peter J.-S. Shiue, An Approach to the Construction of Linear Divisibility Sequences of Higher Orders, Journal of Integer Sequences, Vol. 20 (2017), Article 17.8.2.
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 (1,-1,1,-1).
FORMULA
G.f.: x*(1 - x^2)/(1 - x + x^2 - x^3 + x^4).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4).
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k *binomial(n-k, k)*A000045(n-2*k)/(n -k).
From Peter Bala, Mar 24 2014: (Start)
a(n) = (T(n,alpha) - T(n,beta))/(alpha - beta), where alpha = (1 + sqrt(5))/4 and beta = (1 - sqrt(5))/4 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = bottom left entry of the matrix T(n, M), where M is the 2 X 2 matrix [0, 1/4; 1, 1/2].
The o.g.f. is the Hadamard product of the rational functions x/(1 - 1/2*(sqrt(5) + 1)*x + x^2) and x/(1 - 1/2*(sqrt(5) - 1)*x + x^2). (End)
Euler transform of length 10 sequence [ 1, -2, 0, 0, -1, 0, 0, 0, 0, 1]. - Michael Somos, May 24 2015
a(n) = a(-n) = -a(n + 5) for all n in Z. - Michael Somos, May 24 2015
EXAMPLE
A Chebyshev transform of the Fibonacci numbers A000045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
The denominator is the 10th cyclotomic polynomial.
G.f. = x + x^2 - x^3 - x^4 - x^6 - x^7 + x^8 + x^9 + x^11 + x^12 - x^13 + ...
MAPLE
a := n -> (-1)^iquo(n, 5)*signum(mods(n, 5)):
seq(a(n), n=0..89); # after Michael Somos, Peter Luschny, Dec 30 2018
MATHEMATICA
a[ n_] := {1, 1, -1, -1, 0, -1, -1, 1, 1, 0}[[Mod[ n, 10, 1]]]; (* Michael Somos, May 24 2015 *)
a[ n_] := (-1)^Quotient[ n, 5] Sign[ Mod[ n, 5, -2]]; (* Michael Somos, May 24 2015 *)
a[ n_] := (-1)^Quotient[n, 5] {1, 1, -1, -1, 0}[[Mod[ n, 5, 1]]]; (* Michael Somos, May 24 2015 *)
LinearRecurrence[{1, -1, 1, -1}, {0, 1, 1, -1}, 90] (* Jean-François Alcover, Jun 11 2019 *)
PROG
(PARI) {a(n) = (-1)^(n\5) * [0, 1, 1, -1, -1][n%5+1]}; /* Michael Somos, May 24 2015 */
(PARI) {a(n) = (-1)^(n\5) * sign( centerlift( Mod(n, 5)))}; /* Michael Somos, May 24 2015 */
CROSSREFS
KEYWORD
easy,sign,mult
AUTHOR
Paul Barry, Oct 31 2004
STATUS
approved