%I #35 Jan 02 2024 08:57:32
%S 1,5,8,6,-4,-20,-32,-24,16,80,128,96,-64,-320,-512,-384,256,1280,2048,
%T 1536,-1024,-5120,-8192,-6144,4096,20480,32768,24576,-16384,-81920,
%U -131072,-98304,65536,327680,524288,393216,-262144,-1310720,-2097152,-1572864,1048576
%N a(n) = 2*a(n-1) - 2*a(n-2), with a(0)=1, a(1)=5.
%C Sequence opposite in sign to its second differences.
%C Binomial transform of 1, 4, -1, -4.
%C A bisection gives A135520.
%C This sequence with offset 0 is the binomial transform of (-1)^floor(n/2)*A010685(n). - _R. J. Mathar_, Feb 22 2009
%H G. C. Greubel, <a href="/A136258/b136258.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2).
%F a(4n+1) = 5*(-4)^n, a(4n+3) = 6*(-4)^n. - _M. F. Hasler_, May 01 2008
%F G.f.: x*(1+3*x)/(1-2*x+2*x^2). - _R. J. Mathar_, Feb 22 2009
%F From _Paul Curtz_, Apr 27 2011: (Start)
%F a(n)= -4 * a(n-4).
%F a(n)= 3*A009545(n) + A009545(n+1). (End)
%F E.g.f.: exp(x)*( cos(x) + 4*sin(x) ). - _G. C. Greubel_, Dec 02 2021
%t LinearRecurrence[{2,-2},{1,5},50] (* _Harvey P. Dale_, May 21 2014 *)
%o (PARI) vector(100,n,t=if(n<3,[t1=1,5][n],-2*t1+2*t1=t)) \\ _M. F. Hasler_, May 01 2008
%o (Magma) [n le 2 select 5^(n-1) else 2*(Self(n-1) - Self(n-2)): n in [1..41]]; // _G. C. Greubel_, Dec 02 2021
%o (Sage)
%o A136258=BinaryRecurrenceSequence(2,-2,1,5)
%o [A136258(n) for n in (0..40)] # _G. C. Greubel_, Dec 02 2021
%Y Cf. A010685, A135520.
%K sign,easy
%O 0,2
%A _Paul Curtz_, Mar 18 2008
%E Edited and extended by _M. F. Hasler_, May 01 2008
%E Offset corrected _Paul Curtz_, Apr 27 2011