A104721 Expansion of (1+x)^2/(1-4*x^2).
1, 2, 5, 8, 20, 32, 80, 128, 320, 512, 1280, 2048, 5120, 8192, 20480, 32768, 81920, 131072, 327680, 524288, 1310720, 2097152, 5242880, 8388608, 20971520, 33554432, 83886080, 134217728, 335544320, 536870912, 1342177280, 2147483648
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,4).
Programs
-
GAP
Concatenation([1], List([1..40], n-> 9*2^(n-3) -(-2)^(n-3))); # G. C. Greubel, Jul 14 2019
-
Magma
[1] cat [9*2^(n-3) -(-2)^(n-3): n in [1..40]]; // G. C. Greubel, Jul 14 2019
-
Mathematica
CoefficientList[Series[(1+x)^2/(1-4x^2),{x,0,40}],x] (* or *) LinearRecurrence[{0,4},{1,2,5},40] (* Harvey P. Dale, Dec 05 2015 *)
-
PARI
vector(40, n, n--; (9*2^n +(-2)^n -2*0^n)/8) \\ G. C. Greubel, Jul 14 2019
-
Sage
[1]+[9*2^(n-3) -(-2)^(n-3) for n in (1..40)] # G. C. Greubel, Jul 14 2019
Formula
a(n) = (9*2^n + (-2)^n - 2*0^n)/8.
Comments