OFFSET
1,1
COMMENTS
Continued fraction expansion of (7+sqrt(93))/6. - Klaus Brockhaus, Apr 30 2010
LINKS
Vesselin Dimitrov, Problem S07 - 4 (Corrected). Harvard College Mathematical Review, Vol. 1, No. 2, Fall 2007.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
a(n) = a(n-4) for n>4. G.f.: x*(2*x^3+3*x^2+x+2) / ((1-x)*(x+1)*(x^2+1)). - Colin Barker, Jun 20 2014
a(n) = 2-(-1)^n/2+(-1)^ceiling(n/2)/2. - Wesley Ivan Hurt, Jun 23 2014
a(n) = (4 + cos(n*Pi/2) - cos(n*Pi) - sin(n*Pi/2) - I*sin(n*Pi))/2.
MAPLE
A157810:=n->2 - (-1)^n/2 + (-1)^ceil(n/2)/2; seq(A157810(n), n=1..100); # Wesley Ivan Hurt, Jun 23 2014
MATHEMATICA
ContinuedFraction[(7+Sqrt[93])/6, 100] (* Harvey P. Dale, Jun 28 2012 *)
CoefficientList[Series[-(2*x^3 + 3*x^2 + x + 2)/((x - 1)*(x + 1)*(x^2 + 1)), {x, 0, 60}], x] (* Wesley Ivan Hurt, Jun 22 2014 *)
PROG
(PARI) Vec(-x*(2*x^3+3*x^2+x+2)/((x-1)*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Jun 20 2014
(Magma) [2 - (-1)^n/2 + (-1)^Ceiling(n/2)/2 : n in [1..100]]; // Wesley Ivan Hurt, Jun 23 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Mar 07 2009
EXTENSIONS
Simpler definition from Wesley Ivan Hurt, Jul 07 2014
STATUS
approved