The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140657 Powers of 2 with 3 alternatingly added and subtracted. 4
4, -1, 7, 5, 19, 29, 67, 125, 259, 509, 1027, 2045, 4099, 8189, 16387, 32765, 65539, 131069, 262147, 524285, 1048579, 2097149, 4194307, 8388605, 16777219, 33554429, 67108867, 134217725, 268435459, 536870909, 1073741827, 2147483645, 4294967299, 8589934589 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
Jean-François Alcover and Vincenzo Librandi, Table of n, a(n) for n = 0..1000 (first 101 terms from Jean-François Alcover)
FORMULA
a(2n) = A000079(2n+1) + 3, a(2n+1) = A000079(2n+2) - 3.
a(n+1) - 2*a(n) = -9*A033999(n) = (-1)^(n+1)*A010734.
a(n) + a(n+1) = 3^*2^n = A007283(n).
a(2n) + a(2n+1) = A096045(n) + 2.
a(-n) = -A140683(n)/2^n.
O.g.f.: (4-5*x)/((1-2*x)(1+x)). - R. J. Mathar, Jul 29 2008
a(n) = 2^n+3*(-1)^n. - R. J. Mathar , Jul 29 2008
MATHEMATICA
LinearRecurrence[{1, 2}, {4, -1}, 40] (* or *) Total/@Partition[Riffle[ Table[ 2^n, {n, 0, 40}], {3, -3}], 2] (* Harvey P. Dale, Nov 13 2014 *)
CoefficientList[Series[(4 - 5 x) / ((1 + x) (1 - 2 x)), {x, 0, 50}], x] (* Vincenzo Librandi, Jan 14 2015 *)
PROG
(Magma) [2^n+3*(-1)^n: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
CROSSREFS
Sequence in context: A135857 A156558 A082455 * A348564 A253635 A078975
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jul 10 2008
EXTENSIONS
Edited and extended by R. J. Mathar, Jul 29 2008
4 inserted as first term and formulas accordingly updated by Jean-François Alcover, Jan 14 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 02:14 EDT 2024. Contains 372703 sequences. (Running on oeis4.)