cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A154879 Third differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 16 2009

Keywords

Comments

Second differences of A078008. First differences of the sequence (-1)^(n+1)*A084247(n).

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.
a(n+3) = 8*A001045(n) = 4*A078008(n+1) = 2*A097073(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