A084183 Jacobsthal reverse-pair sequence.
0, 1, 1, 5, 3, 21, 11, 85, 43, 341, 171, 1365, 683, 5461, 2731, 21845, 10923, 87381, 43691, 349525, 174763, 1398101, 699051, 5592405, 2796203, 22369621, 11184811, 89478485, 44739243, 357913941, 178956971, 1431655765, 715827883, 5726623061
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,4,4).
Programs
-
Magma
[(5*2^n-6*0^n+4*(-1)^n-3*(-2)^n)/12: n in [0..40]]; // Vincenzo Librandi, Aug 13 2011
-
Mathematica
LinearRecurrence[{-1,4,4},{0,1,1,5},40] (* Harvey P. Dale, Nov 26 2022 *)
-
PARI
a(n)=if(n,(5*2^n+4*(-1)^n-3*(-2)^n)/12,0) \\ Charles R Greathouse IV, Oct 24 2014
Formula
G.f.: x*(1 + 2*x + 2*x^2)/((1+x)(1+2x)(1-2x)).
a(n) = (5*2^n - 6*0^n + 4(-1)^n - 3(-2)^n)/12. - Paul Barry, May 19 2003
a(n) - 2*a(n-1) is a signed version of A000225. - Paul Curtz, Mar 06 2008
Comments