%I #22 Sep 08 2022 08:45:09
%S 0,1,4,5,20,21,84,85,340,341,1364,1365,5460,5461,21844,21845,87380,
%T 87381,349524,349525,1398100,1398101,5592404,5592405,22369620,
%U 22369621,89478484,89478485,357913940,357913941,1431655764,1431655765,5726623060
%N Partial sums of Jacobsthal gap sequence.
%H Vincenzo Librandi, <a href="/A080610/b080610.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,5,0,-4).
%F a(2n-1) = A001045(2n) = A002450(n); a(2n) = A001045(2n) - 1 = A002450(n) - 1.
%F G.f.: x*(1+4*x)/((1-x^2)*(1-4x^2)). - _Ralf Stephan_, Sep 16 2003
%F a(n) = 2^n+(-2)^n/3-(-1)^n/2-5/6. - _Paul Barry_, Apr 22 2004
%F a(n) = a(n-1)*4 if n even; a(n) = a(n-1)+1 if n odd. - _Philippe Deléham_, Apr 22 2013
%t CoefficientList[Series[x (1 + 4 x) / ((1 - x^2) (1 - 4 x^2)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Aug 05 2013 *)
%t LinearRecurrence[{0,5,0,-4},{0,1,4,5},40] (* _Harvey P. Dale_, Nov 11 2021 *)
%o (Magma) [2^n+(-2)^n/3-(-1)^n/2-5/6: n in [0..30]]; // _Vincenzo Librandi_, Aug 05 2013
%Y Cf. A075427, A080924, A094025.
%K nonn,easy
%O 0,3
%A _Paul Barry_, Feb 26 2003