A243860 a(n) = 2^(n+1) - (n-1)^2.
1, 4, 7, 12, 23, 48, 103, 220, 463, 960, 1967, 3996, 8071, 16240, 32599, 65340, 130847, 261888, 523999, 1048252, 2096791, 4193904, 8388167, 16776732, 33553903, 67108288, 134217103, 268434780, 536870183, 1073741040, 2147482807, 4294966396, 8589933631, 17179868160, 34359737279, 68719475580
Offset: 0
Examples
1 = 2^(0+1) - (0-1)^2, 4 = 2^(1+1) - (1-1)^2, 7 = 2^(2+1) - (2-1)^2.
Links
- Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
Crossrefs
Sequences of the form (k-1)^m - m^(k+1): A000012 (m = 0), A023444 (m = 1), (-1)*(this sequence) for m = 2, A114285 (k = 0),(A000007-A000290) for k = 1, A024001 (k = 2), A024014 (k = 3), A024028 (k = 4), A024042 (k = 5), A024056 (k = 6), A024070 (k = 7), A024084 (k = 8), A024098 (k = 9), A024112 (k = 10), A024126 (k = 11).
Programs
-
Magma
[2^(n+1) - (n-1)^2: n in [0..35]];
-
Maple
A243860:=n->2^(n + 1) - (n - 1)^2; seq(A243860(n), n=0..30); # Wesley Ivan Hurt, Jun 12 2014
-
Mathematica
Table[2^(n + 1) - (n - 1)^2, {n, 0, 30}] (* Wesley Ivan Hurt, Jun 12 2014 *) LinearRecurrence[{5,-9,7,-2},{1,4,7,12},40] (* Harvey P. Dale, Nov 29 2015 *)
-
PARI
Vec((6*x^3-4*x^2-x+1)/((x-1)^3*(2*x-1)) + O(x^100)) \\ Colin Barker, Jun 12 2014
Formula
a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4). - Colin Barker, Jun 12 2014
G.f.: (6*x^3-4*x^2-x+1) / ((x-1)^3*(2*x-1)). - Colin Barker, Jun 12 2014
Comments