OFFSET
1,1
COMMENTS
Applet randomly selects from among nine algorithms and each algorithm has its own random parameters. Six terms are presented and you get to guess the next term.
LINKS
Alexander Bogomolny's Cut-the-Knot.org, What's Next?
Index entries for linear recurrences with constant coefficients, signature (0,-1,0,2).
FORMULA
a(1)=4, a(2n) = a(2n-1) - 4, a(2n+1) = a(2n)*(-2).
a(n) = (1/3)*(2 - 6(-1)^n - 2(-2)^ceiling(n/2)). - Ralf Stephan, Dec 04 2004
O.g.f.: 4*x*(-1 - x^2 + x^3)/((-1+x)*(1+x)*(1+2*x^2)). - R. J. Mathar, Dec 05 2007
a(n) = -a(n-2) + 2*a(n-4); a(1)=4, a(2)=0, a(3)=0, a(4)=-4. - Harvey P. Dale, May 01 2016
MATHEMATICA
LinearRecurrence[{0, -1, 0, 2}, {4, 0, 0, -4}, 50] (* Harvey P. Dale, May 01 2016 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Herman DeWeerd (bhdeweerd(AT)worldnet.att.net), Aug 07 2004
EXTENSIONS
Description found by Ray Chandler, Aug 07 2004
STATUS
approved