login
Numerators of Taylor series for exp(x)*cos(x).
4

%I #26 Nov 02 2024 18:06:04

%S 1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,

%T -1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,

%U 0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1

%N Numerators of Taylor series for exp(x)*cos(x).

%C Lehmer sequence U_n for R=2 Q=1. [_Artur Jasinski_, Oct 06 2008]

%D G. W. Caunt, Infinitesimal Calculus, Oxford Univ. Press, 1914, p. 477.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, -1).

%F G.f.: (1+x-x^3)/(1+x^4).

%F a(n) = (b^(n+1) - c^(n+1))/(b - c) where b = sqrt(2)-((1 + I)/sqrt(2)), c = (1 + I)/sqrt(2). [_Artur Jasinski_, Oct 06 2008]

%e 1 + 1*x - (1/3)*x^3 - (1/6)*x^4 - (1/30)*x^5 + (1/630)*x^7 + (1/2520)*x^8 + (1/22680)*x^9 - ...

%p A046980 := n -> `if`(n mod 4 = 2, 0, (-1)^floor((n+1)/4)):

%p seq(A046980(n), n=0..92); # _Peter Luschny_, Jun 16 2017

%t b = -((1 + I)/Sqrt[2]) + Sqrt[2]; c = (1 + I)/Sqrt[2]; Table[ Round[(b^n - c^n)/(b - c)], {n, 2, 200}] (* _Artur Jasinski_, Oct 06 2008 *)

%t LinearRecurrence[{0, 0, 0, -1}, {1, 1, 0, -1}, 100] (* _Jean-François Alcover_, Apr 01 2016 *)

%t PadRight[{},120,{1,1,0,-1,-1,-1,0,1}] (* _Harvey P. Dale_, Nov 02 2024 *)

%Y Cf. A046981.

%K sign,frac,easy,nice,changed

%O 0,1

%A _N. J. A. Sloane_