A186422 First differences of A186421.
1, 1, -1, 3, -1, 3, -3, 5, -3, 5, -5, 7, -5, 7, -7, 9, -7, 9, -9, 11, -9, 11, -11, 13, -11, 13, -13, 15, -13, 15, -15, 17, -15, 17, -17, 19, -17, 19, -19, 21, -19, 21, -21, 23, -21, 23, -23, 25, -23, 25, -25, 27, -25, 27, -27, 29, -27, 29, -29, 31, -29, 31, -31, 33, -31, 33, -33, 35, -33, 35, -35, 37, -35, 37, -37, 39, -37, 39, -39, 41, -39, 41, -41, 43
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,0,0,1,1).
Programs
-
Haskell
a186422 n = a186422_list !! n a186422_list = zipWith (-) (tail a186421_list) a186421_list
-
Magma
/* By definition: */ A186421:=func
; [A186421(n+1)-A186421(n): n in [0..90]]; // Bruno Berselli, Mar 04 2013 -
Mathematica
Differences@ CoefficientList[Series[x (1 + 2 x + 2 x^3 + x^4)/((1 + x^2) (x - 1)^2 (1 + x)^2), {x, 0, 84}], x] (* Michael De Vlieger, Oct 02 2017 *)
-
Maxima
makelist(-((2*n+1)*(-1)^n-2*%i^(n*(n+1))-3)/4,n,0,83); /* Bruno Berselli, Mar 04 2013 */
Formula
G.f.: -(x^4+2*x^3+2*x+1) / ((x-1)*(x+1)^2*(x^2+1)). - Colin Barker, Mar 04 2013
a(n) = -((2*n+1)*(-1)^n-2*i^(n*(n+1))-3)/4, where i=sqrt(-1). [Bruno Berselli, Mar 04 2013]
a(n) = cos((n-1)*Pi)*(2*n+1-2*cos(n*Pi/2)-3*cos(n*Pi)-2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: (cos(x) + (1 + x)*cosh(x) - sin(x) - (x - 2)*sinh(x))/2. - Stefano Spezia, May 09 2021
Comments