A084181 2^n+(-2)^n-(-1)^n.
1, 1, 7, 1, 31, 1, 127, 1, 511, 1, 2047, 1, 8191, 1, 32767, 1, 131071, 1, 524287, 1, 2097151, 1, 8388607, 1, 33554431, 1, 134217727, 1, 536870911, 1, 2147483647, 1, 8589934591, 1, 34359738367, 1, 137438953471, 1, 549755813887, 1, 2199023255551
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,4,4).
Crossrefs
Cf. A083420.
Programs
-
Mathematica
LinearRecurrence[{-1,4,4},{1,1,7},50] (* or *) Riffle[ LinearRecurrence[ {5,-4},{1,7},30],1] (* Harvey P. Dale, Jan 02 2019 *)
Formula
a(n)=2^n+(-2)^n-(-1)^n;
G.f.: (1+2x+4x^2)/((1+x)(1+2x)(1-2x));
E.g.f.: exp(2x)-exp(-x)+exp(-2x).
Comments