%I #18 Nov 26 2022 18:01:30
%S 0,1,1,5,3,21,11,85,43,341,171,1365,683,5461,2731,21845,10923,87381,
%T 43691,349525,174763,1398101,699051,5592405,2796203,22369621,11184811,
%U 89478485,44739243,357913941,178956971,1431655765,715827883,5726623061
%N Jacobsthal reverse-pair sequence.
%C Reverses elements a(2n+1) and a(2n+2) in A001045.
%H Vincenzo Librandi, <a href="/A084183/b084183.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,4,4).
%F G.f.: x*(1 + 2*x + 2*x^2)/((1+x)(1+2x)(1-2x)).
%F a(n) = (5*2^n - 6*0^n + 4(-1)^n - 3(-2)^n)/12. - _Paul Barry_, May 19 2003
%F a(n) - 2*a(n-1) is a signed version of A000225. - _Paul Curtz_, Mar 06 2008
%t LinearRecurrence[{-1,4,4},{0,1,1,5},40] (* _Harvey P. Dale_, Nov 26 2022 *)
%o (Magma) [(5*2^n-6*0^n+4*(-1)^n-3*(-2)^n)/12: n in [0..40]]; // _Vincenzo Librandi_, Aug 13 2011
%o (PARI) a(n)=if(n,(5*2^n+4*(-1)^n-3*(-2)^n)/12,0) \\ _Charles R Greathouse IV_, Oct 24 2014
%K easy,nonn
%O 0,4
%A _Paul Barry_, May 19 2003