|
|
A117569
|
|
Expansion of (1+x+x^2)/(1+x^2).
|
|
5
|
|
|
1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1-x^3)/((1-x)(1+x^2)); a(n)=0^n+(1-(-1)^n)(cos(pi*n/2)+sin(pi*n/2))/2;
Expansion of (1 - x^2) * (1 - x^3) / ((1 - x) * (1 - x^4)) in powers of x.
G.f.: 1 / (1 - x / (1 + x / (1 - x / (1 + x)))). - Michael Somos, Apr 02 2012
Euler transform of length 4 sequence [ 1, -1, -1, 1]. - Michael Somos, Aug 04 2009
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = v - u * (2 - u) * (2*v - 1).
a(n) is completely multiplicative with a(2^e) = 0^e, a(p^e) = 1 if p == 1 (mod 4), a(p^e) = (-1)^e if p == 3 (mod 4).
a(2*n) = 0 unless n=0, a(4*n + 3) = -1, a(4*n + 1) = a(0) = 1.
a(-n) = -a(n) unless n=0. a(n+2) = -a(n) unless n=0 or n=-2.
a(n) = floor(1/(n+1)) + (1-(-1)^n)/2*(-1)^((n-1)/2). - Tani Akinari, Nov 09 2012
|
|
EXAMPLE
|
1 + x - x^3 + x^5 - x^7 + x^9 - x^11 + x^13 - x^15 + x^17 - x^19 + ...
|
|
MATHEMATICA
|
CoefficientList[Series[(1+x+x^2)/(1+x^2), {x, 0, 120}], x] (* or *) LinearRecurrence[{0, -1}, {1, 1, 0}, 120] (* or *) PadRight[{1}, 120, {0, 1, 0, -1}] (* Harvey P. Dale, Dec 12 2016 *)
|
|
PROG
|
(PARI) a(n) = (n==0) + [0, 1, 0, -1][n%4 + 1] /* Michael Somos, Aug 04 2009 */
(PARI) a(n) = (n==0) + kronecker( -4, n) /* Michael Somos, Aug 04 2009 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|