OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
a(n) = 1/4 + cos(1/2*Pi*n) - 1/2*sin(1/2*Pi*n) + 1/4*(-1)^(1+n). - R. J. Mathar, Nov 15 2007
G.f.: (1-x^2+x^3) / ((1-x)*(1+x)*(x^2+1)). - R. J. Mathar, Jun 02 2011
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016
a(n) = 1 - A130731(n+3). - Wesley Ivan Hurt, Dec 23 2016
MAPLE
seq(op([1, 0, -1, 1]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {1, 0, -1, 1}] (* Wesley Ivan Hurt, Jul 09 2016 *)
CoefficientList[Series[(1 - x^2 + x^3)/((1 - x) (1 + x) (x^2 + 1)), {x, 0, 80}], x] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(Magma) &cat [[1, 0, -1, 1]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Oct 01 2007
STATUS
approved