%I #45 Sep 08 2022 08:44:51
%S 1,1,4,6,15,27,58,112,229,453,912,1818,3643,7279,14566,29124,58257,
%T 116505,233020,466030,932071,1864131,3728274,7456536,14913085,
%U 29826157,59652328,119304642,238609299
%N Alternating sum transform (PSumSIGN) of A000975.
%H Vincenzo Librandi, <a href="/A034299/b034299.txt">Table of n, a(n) for n = 0..1000</a>
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-1,-2).
%F a(n) = sum{k=0..floor(n/2), A001045(n-2k+1)}. - _Paul Barry_, Nov 24 2003
%F G.f.: (1/(1-x^2))/(1-x-2x^2); a(n) = sum{k=0..n+1, A001045(k)*(1-(-1)^floor((n+k)/2))}; - _Paul Barry_, Apr 16 2005
%F a(n) = sum_{k, 0<=k<=n} A126258(n,k). - _Philippe Deléham_, Mar 13 2007
%F a(n) = 2*a(n-1)+A001057(n+1), with a(0)=1. - _Bruno Berselli_, Nov 09 2010
%F a(n) = (2^(n+5)+(6n+13)(-1)^n-9)/36. - _Bruno Berselli_, Apr 04 2012
%F a(n) = a(n-1) + 2*a(n-2) + (1 + (-1)^n) / 2. - _Michael Somos_, Jan 23 2014
%F A160156(n) = a(2*n). - _Michael Somos_, Oct 16 2020
%e G.f. = 1 + x + 4*x^2 + 6*x^3 + 15*x^4 + 27*x^5 + 58*x^6 + 112*x^7 + ...
%t CoefficientList[Series[(1/(1-x^2))/(1-x-2x^2),{x,0,40}],x] (* _Vincenzo Librandi_, Apr 04 2012 *)
%t Table[(2^(n + 5) + (6 n + 13) (-1)^n - 9)/36, {n, 0, 28}] (* _Bruno Berselli_, Apr 04 2012 *)
%t LinearRecurrence[{1,3,-1,-2},{1,1,4,6},30] (* _Harvey P. Dale_, Jun 11 2019 *)
%o (PARI) {a(n) = (32 * 2^n - 9 + (6*n + 13) * (-1)^n) / 36}; /* _Michael Somos_, Jan 23 2014 */
%o (Magma) [(2^(n+5)+(6n+13)(-1)^n-9)/36: n in [0..50]]; // _G. C. Greubel_, Oct 12 2017
%Y Cf. A160156.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_