[go: up one dir, main page]

login
A084100
Expansion of (1+x-x^2-x^3)/(1+x^2).
4
1, 1, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2
OFFSET
0,3
COMMENTS
Partial sums are A084099.
The unsigned sequence 1,1,2,2,2,2,.. has g.f. (1+x^2)/(1-x) and a(n)=sum{k=0..n, binomial(1,k/2)(1+(-1)^k)/2}. Its partial sums are A004275(n+1). The sequence 1,-1,2,-2,2,-2,... has g.f. (1+x^2)/(1+x) and a(n)=sum{k=0..n, (-1)^(n-k)binomial(1,k/2)(1+(-1)^k)/2}. - Paul Barry, Oct 15 2004
FORMULA
Euler transform of length 4 sequence [1, -3, 0, 1]. - Michael Somos, Jan 05 2017
G.f.: (1 + x) * (1 - x^2) / (1 + x^2). - Michael Somos, Jan 05 2017
a(n) = a(1-n) for all n in Z. - Michael Somos, Jan 05 2017
a(2*n) = a(2*n + 1) = A280560(n) for all n in Z. - Michael Somos, Jan 05 2017
EXAMPLE
G.f. = 1 + x - 2*x^2 - 2*x^3 + 2*x^4 + 2*x^5 - 2*x^6 - 2*x^7 + 2*x^8 + 2*x^9 + ...
MATHEMATICA
CoefficientList[Series[(1+x-x^2-x^3)/(1+x^2), {x, 0, 100}], x] (* Harvey P. Dale, Apr 20 2011 *)
a[ n_] := (-1)^Quotient[n, 2] If[ Quotient[n, 2] != 0, 2, 1]; (* Michael Somos, Jan 05 2017 *)
PROG
(PARI) {a(n) = (-1)^(n\2) * if( n\2, 2, 1)}; /* Michael Somos, Jan 05 2017 */
CROSSREFS
Sequence in context: A300403 A077433 A065685 * A329683 A130130 A046698
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 15 2003
STATUS
approved