login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A080040
a(n) = 2*a(n-1) + 2*a(n-2) for n > 1; a(0)=2, a(1)=2.
37
2, 2, 8, 20, 56, 152, 416, 1136, 3104, 8480, 23168, 63296, 172928, 472448, 1290752, 3526400, 9634304, 26321408, 71911424, 196465664, 536754176, 1466439680, 4006387712, 10945654784, 29904084992, 81699479552, 223207129088, 609813217280, 1666040692736, 4551707820032
OFFSET
0,1
COMMENTS
The Lucas sequence V_n(2,-2). - Jud McCranie, Mar 02 2012
The signed version 2, -2, 8, -20, 56, -152, 416, -1136, 3104, -8480, 23168, ... is the Lucas sequence V(-2,-2). - R. J. Mathar, Jan 08 2013
After a(2) equals round((1+sqrt(3))^n) = 1, 3, 7, 20, 56, 152, ... - Jeremy Gardiner, Aug 11 2013
Also the number of independent vertex sets and vertex covers in the n-sunlet graph. - Eric W. Weisstein, Sep 27 2017
LINKS
I. Amburg, K. Dasaratha, L. Flapan, T. Garrity, C. Lee, C. Mihailak, N. Neumann-Chun, S. Peluse, and M. Stoffregen, Stern Sequences for a Family of Multidimensional Continued Fractions: TRIP-Stern Sequences, arXiv:1509.05239v1 [math.CO], 2015-2017.
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
D. Jhala, G. P. S. Rathore, and K. Sisodiya, Some Properties of k-Jacobsthal Numbers with Arithmetic Indexes, Turkish Journal of Analysis and Number Theory, 2014, Vol. 2, No. 4, 119-124.
Tanya Khovanova, Recursive Sequences
D. H. Lehmer, On Lucas's test for the primality of Mersenne's numbers, Journal of the London Mathematical Society 1.3 (1935): 162-165. See V_n.
Eric Weisstein's World of Mathematics, Independent Vertex Set
Eric Weisstein's World of Mathematics, Sunlet Graph
Eric Weisstein's World of Mathematics, Vertex Cover
FORMULA
G.f.: (2-2*x)/(1-2*x-2*x^2).
a(n) = (1+sqrt(3))^n + (1-sqrt(3))^n.
a(n) = 2*A026150(n). - Philippe Deléham, Nov 19 2008
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(3*k-1)/(x*(3*k+2) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 11 2013
a(n) = 2*2^floor(n/2)*A002531(n). - Ralf Stephan, Sep 08 2013
a(n) = [x^n] ( 1 + x + sqrt(1 + 2*x + 3*x^2) )^n for n >= 1. - Peter Bala, Jun 29 2015
E.g.f.: 2*exp(x)*cosh(sqrt(3)*x). - Stefano Spezia, Mar 02 2024
MATHEMATICA
CoefficientList[Series[(2 - 2 t)/(1 - 2 t - 2 t^2), {t, 0, 30}], t]
With[{c = {2, 2}}, LinearRecurrence[c, c, 20]] (* Harvey P. Dale, Apr 24 2016 *)
Round @ Table[LucasL[n, Sqrt[2]] 2^(n/2), {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
Table[(1 - Sqrt[3])^n + (1 + Sqrt[3])^n, {n, 0, 20}] // Expand (* Eric W. Weisstein, Sep 27 2017 *)
PROG
(Sage) from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(2, 2, 2, 2, lambda n: 0); [next(it) for i in range(27)] # Zerinvary Lajos, Jul 16 2008
(Sage) [lucas_number2(n, 2, -2) for n in range(0, 27)] # Zerinvary Lajos, Apr 30 2009
(Haskell)
a080040 n = a080040_list !! n
a080040_list =
2 : 2 : map (* 2) (zipWith (+) a080040_list (tail a080040_list))
-- Reinhard Zumkeller, Oct 15 2011
(PARI) a(n)=([0, 1; 2, 2]^n*[2; 2])[1, 1] \\ Charles R Greathouse IV, Apr 08 2016
(Magma) a:=[2, 2]; [n le 2 select a[n] else 2*Self(n-1) + 2*Self(n-2):n in [1..27]]; Marius A. Burtea, Jan 20 2020
(Magma) R<x>:=PowerSeriesRing(Rationals(), 27); Coefficients(R!( (2-2*x)/(1-2*x-2*x^2))); // Marius A. Burtea, Jan 20 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Jan 21 2003
STATUS
approved