A123344 Expansion of (1+3*x)/(1+2*x).
1, 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
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000 (terms 0..200 from Vincenzo Librandi)
- Index entries for linear recurrences with constant coefficients, signature (-2).
Crossrefs
Cf. A011782 (unsigned version).
Programs
-
Magma
[1] cat [(-2)^(n-1): n in [1..35]]; // Vincenzo Librandi, Feb 14 2014
-
Maple
a:=n->mul(-2, k=0..n): seq(a(n), n=-2..30); # Zerinvary Lajos, Jan 22 2008
-
Mathematica
Table[(-2)^(n - Sign[n]), {n, 0, 30}] (* Wesley Ivan Hurt, Feb 01 2014 *) Join[{1},LinearRecurrence[{-2},{1},32]] (* Ray Chandler, Aug 12 2015 *) Join[{1},NestList[-2#&,1,40]] (* Harvey P. Dale, Aug 24 2019 *)
-
PARI
x='x+O('x^50); Vec((1+3*x)/(1+2*x)) \\ G. C. Greubel, Oct 12 2017
Formula
a(0)=1, a(n) = (-2)^(n-1) for n>0.
G.f.: (1+3*x)/(1+2*x).
G.f.: 1/U(0) where U(k)= 1 - x*(k+4) + x*(k+3)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 11 2012
E.g.f.: (3 - exp(-2*x))/2. - G. C. Greubel, Oct 12 2017
a(n) = numerator((1/2 - n)!/sqrt(Pi)). - Peter Luschny, Jun 21 2020
Comments