A135440 a(n) = a(n-1) + 2a(n-2).
-1, 4, 2, 10, 14, 34, 62, 130, 254, 514, 1022, 2050, 4094, 8194, 16382, 32770, 65534, 131074, 262142, 524290, 1048574, 2097154, 4194302, 8388610, 16777214, 33554434, 67108862, 134217730, 268435454, 536870914, 1073741822, 2147483650, 4294967294, 8589934594, 17179869182, 34359738370
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- OEIS Wiki, Autosequence
- Index entries for linear recurrences with constant coefficients, signature (1,2).
Programs
-
Haskell
a135440 n = a135440_list !! n a135440_list = zipWith (-) (tail a014551_list) a014551_list -- Reinhard Zumkeller, Jan 02 2013
-
Mathematica
f[n_]:=2/(n+1);x=4;Table[x=f[x];Numerator[x],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 12 2010 *) LinearRecurrence[{1,2}, {-1,4}, 25] (* or *) Table[2^n - 2*(-1)^n, {n,0,25}] (* G. C. Greubel, Oct 14 2016 *)
Formula
From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: -1/(2*x-1) - 2/(1+x).
a(n) = 2^n - 2*(-1)^n. (End)
a(n) = 2*A014551(n-1), n>0. - Paul Curtz, Jun 01 2011
E.g.f.: exp(2*x) - 2*exp(-x). - G. C. Greubel, Oct 14 2016
Extensions
More terms from R. J. Mathar, Feb 19 2008
Comments