A154879 Third differences of the Jacobsthal sequence A001045.
3, -2, 4, 0, 8, 8, 24, 40, 88, 168, 344, 680, 1368, 2728, 5464, 10920, 21848, 43688, 87384, 174760, 349528, 699048, 1398104, 2796200, 5592408, 11184808, 22369624, 44739240, 89478488, 178956968, 357913944, 715827880, 1431655768, 2863311528, 5726623064
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2).
Crossrefs
Cf. A115341.
Programs
-
Magma
[(1/3)*(8*(-1)^n+2^n): n in [0..35]]; // Vincenzo Librandi, Jul 24 2011
-
Mathematica
Differences[LinearRecurrence[{1,2},{0,1},40],3] (* or *) LinearRecurrence[ {1,2},{3,-2},40] (* Harvey P. Dale, Apr 20 2018 *)
-
Python
def A154879(n): return ((1<
2 else (3,-2,4)[n] # Chai Wah Wu, Apr 18 2025
Formula
a(n) + a(n+1) = A000079(n), n > 1.
From R. J. Mathar, Jan 23 2009: (Start)
a(n) = a(n-1) + 2*a(n-2).
G.f.: (3-5*x)/((1+x)*(1-2*x)). (End)
Extensions
Edited and extended by R. J. Mathar, Jan 23 2009
Typo in A-number in formula corrected by R. J. Mathar, Feb 23 2009
Comments