OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (-1,2,2,-1,-1).
FORMULA
a(2n) = 1 - a(2n-1), a(2n+1) = 2*n + 1 - a(2n).
G.f.: -x^2*(-1-3*x+x^2+x^3) / ( (x-1)^2*(1+x)^3 ). - R. J. Mathar, Apr 14 2011
a(n) = (2*n+3-(2*n^2-2*n-5)*(-1)^n)/8. - Luce ETIENNE, Dec 18 2014
E.g.f.: ((4 + x - x^2)*cosh(x) - (1 - x - x^2)*sinh(x) - 4)/4. - Stefano Spezia, Jul 08 2023
MATHEMATICA
Differences[Flatten[Array[{#, #^2}&, 40]]] (* Harvey P. Dale, Aug 04 2012 *)
PROG
(Haskell)
a188652 n = a188652_list !! (n-1)
a188652_list = zipWith (-) (tail a000463_list) a000463_list
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Apr 13 2011
STATUS
approved