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”).

A269019
a(n) = 2^n + 2*(-1)^n - 1.
1
2, -1, 5, 5, 17, 29, 65, 125, 257, 509, 1025, 2045, 4097, 8189, 16385, 32765, 65537, 131069, 262145, 524285, 1048577, 2097149, 4194305, 8388605, 16777217, 33554429, 67108865, 134217725, 268435457, 536870909, 1073741825, 2147483645, 4294967297, 8589934589
OFFSET
0,1
COMMENTS
Fermat numbers > 3 from A000215 are terms.
Prime terms are in A269018.
Union of A052539 and A267921.
FORMULA
G.f.: (2-5*x+5*x^2)/((1-2*x)*(1-x^2)). - Vincenzo Librandi, Feb 18 2016
EXAMPLE
For n = 6; a(n) = 2^n + 2*(-1)^n - 1 = 2^6 + 2*(-1)^6 - 1 = 65.
MATHEMATICA
Table [2^n + 2 (-1)^n - 1, {n, 0, 80}] (* or *) CoefficientList[Series[(2 - 5 x + 5 x^2) / ((1 - 2 x) (1 - x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 18 2016 *)
LinearRecurrence[{2, 1, -2}, {2, -1, 5}, 40] (* Harvey P. Dale, Feb 25 2022 *)
PROG
(Magma) [2^n + 2*(-1)^n - 1: n in [0..300]]
CROSSREFS
KEYWORD
sign
AUTHOR
Jaroslav Krizek, Feb 17 2016
STATUS
approved