A122803 Powers of -2: a(n) = (-2)^n.
1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, -2048, 4096, -8192, 16384, -32768, 65536, -131072, 262144, -524288, 1048576, -2097152, 4194304, -8388608, 16777216, -33554432, 67108864, -134217728, 268435456, -536870912, 1073741824, -2147483648, 4294967296, -8589934592, 17179869184
Offset: 0
Links
- Franklin T. Adams-Watters, Table of n, (-2)^n for n = 0..1000
- Tanya Khovanova, Recursive Sequences
- Eric Weisstein's World of Mathematics, Negabinary.
- Index entries for linear recurrences with constant coefficients, signature (-2).
Crossrefs
Programs
-
Magma
[(-2)^n: n in [0..60]]; // Vincenzo Librandi, Oct 22 2014
-
Maple
A122803:=n->(-2)^n; seq(A122803(n), n=0..50); # Wesley Ivan Hurt, Mar 30 2014
-
Mathematica
Table[(-2)^n, {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2011 *)
-
PARI
a(n)=(-2)^n \\ Charles R Greathouse IV, Sep 24 2015
-
Python
def A122803(n): return -(1<
Chai Wah Wu, Nov 18 2022
Formula
a(n) = (-2)^n = (-1)^n * 2^n.
a(n) = -2*a(n-1), n > 0; a(0) = 1. G.f.: 1/(1+2x). - Philippe Deléham, Nov 19 2008
Sum_{n >= 0} 1/a(n) = 2/3. - Jaume Oliver Lafont, Mar 01 2009
E.g.f.: 1/exp(2*x). - Arkadiusz Wesolowski, Aug 13 2012
a(n) = Sum_{k = 0..n} (-2)^(n-k)*binomial(n, k)*A030195(n+1). - R. J. Mathar, Oct 15 2012
Comments