OFFSET
0,1
COMMENTS
Row sums of A117568.
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;
a(n) = A101455(n), n>0. - R. J. Mathar, Aug 10 2008
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.
E.g.f.: 1 + sin(x). - Arkadiusz Wesolowski, Aug 13 2012
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
Paul Barry, Mar 29 2006
STATUS
approved