login
A084640
Generalized Jacobsthal numbers.
4
0, 1, 5, 11, 25, 51, 105, 211, 425, 851, 1705, 3411, 6825, 13651, 27305, 54611, 109225, 218451, 436905, 873811, 1747625, 3495251, 6990505, 13981011, 27962025, 55924051, 111848105, 223696211, 447392425, 894784851, 1789569705, 3579139411
OFFSET
0,3
COMMENTS
This is the sequence A(0,1;1,2;4) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010
FORMULA
G.f.: x*(1+3*x)/((1-x^2)*(1-2*x)).
a(n) = a(n-1) + 2a(n-2) + 4, a(0)=0, a(1)=1.
a(n) = (5*2^n + (-1)^n - 6)/3.
a(n) = A001045(n+2) + 4*A000975(n-3).
a(n+1) - 2*a(n) = period 2: repeat 1, 3. - Paul Curtz, Apr 03 2008
Contribution from Paul Curtz, Dec 10 2009: (Start)
a(n+2) - a(n) = A020714(n).
Le the array D(n,k) of the first differences be defined via D(0,k) = a(k); D(n+1,k) = D(n,k+1)-D(n,k).
Then D(n,n) = 4*A131577(n); D(1,k) = A084214(k+1); D(2,k) = A115102(k-1) for k>0; D(3,k) = (-1)^(k+1)*A083581(k). (End)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), a(0)=0, a(1)=1, a(2)=5. Observed by G. Detlefs. See the W. Lang link. - Wolfdieter Lang, Oct 18 2010
MATHEMATICA
LinearRecurrence[{2, 1, -2}, {0, 1, 5}, 40] (* Harvey P. Dale, Oct 27 2015 *)
PROG
(Magma) [5*2^n/3+(-1)^n/3-2: n in [0..35]]; // Vincenzo Librandi, Jun 15 2011
(Haskell)
a084640 n = a084640_list !! n
a084640_list = 0 : 1 : (map (+ 4) $
zipWith (+) (map (* 2) a084640_list) (tail a084640_list))
-- Reinhard Zumkeller, May 23 2013
(PARI) x='x+O('x^50); Vec(x*(1+3*x)/((1-x^2)*(1-2*x))) \\ G. C. Greubel, Sep 26 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jun 06 2003
STATUS
approved