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.
%I A084640 #29 Sep 08 2022 08:45:11 %S A084640 0,1,5,11,25,51,105,211,425,851,1705,3411,6825,13651,27305,54611, %T A084640 109225,218451,436905,873811,1747625,3495251,6990505,13981011, %U A084640 27962025,55924051,111848105,223696211,447392425,894784851,1789569705,3579139411 %N A084640 Generalized Jacobsthal numbers. %C A084640 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 %H A084640 Vincenzo Librandi, <a href="/A084640/b084640.txt">Table of n, a(n) for n = 0..1000</a> %H A084640 Wolfdieter Lang, <a href="/A084640/a084640.pdf">Notes on certain inhomogeneous three term recurrences.</a> [From _Wolfdieter Lang_, Oct 18 2010] %H A084640 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-2). %F A084640 G.f.: x*(1+3*x)/((1-x^2)*(1-2*x)). %F A084640 a(n) = a(n-1) + 2a(n-2) + 4, a(0)=0, a(1)=1. %F A084640 a(n) = (5*2^n + (-1)^n - 6)/3. %F A084640 a(n) = A001045(n+2) + 4*A000975(n-3). %F A084640 a(n+1) - 2*a(n) = period 2: repeat 1, 3. - _Paul Curtz_, Apr 03 2008 %F A084640 Contribution from Paul Curtz, Dec 10 2009: (Start) %F A084640 a(n+2) - a(n) = A020714(n). %F A084640 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). %F A084640 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) %F A084640 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 %t A084640 LinearRecurrence[{2,1,-2},{0,1,5},40] (* _Harvey P. Dale_, Oct 27 2015 *) %o A084640 (Magma) [5*2^n/3+(-1)^n/3-2: n in [0..35]]; // _Vincenzo Librandi_, Jun 15 2011 %o A084640 (Haskell) %o A084640 a084640 n = a084640_list !! n %o A084640 a084640_list = 0 : 1 : (map (+ 4) $ %o A084640 zipWith (+) (map (* 2) a084640_list) (tail a084640_list)) %o A084640 -- _Reinhard Zumkeller_, May 23 2013 %o A084640 (PARI) x='x+O('x^50); Vec(x*(1+3*x)/((1-x^2)*(1-2*x))) \\ _G. C. Greubel_, Sep 26 2017 %Y A084640 Cf. A000975, A000225, A084639. %K A084640 easy,nonn %O A084640 0,3 %A A084640 _Paul Barry_, Jun 06 2003