A024012 a(n) = 2^n - n^2.
1, 1, 0, -1, 0, 7, 28, 79, 192, 431, 924, 1927, 3952, 8023, 16188, 32543, 65280, 130783, 261820, 523927, 1048176, 2096711, 4193820, 8388079, 16776640, 33553807, 67108188, 134216999, 268434672, 536870071, 1073740924, 2147482687, 4294966272, 8589933503, 17179868028, 34359737143
Offset: 0
References
- GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Anant Godbole and Martha Liendo, Waiting time distribution for the emergence of superpatterns, arxiv 1302.4668 [math.PR], 2013.
- Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
Crossrefs
Programs
-
Magma
[2^n-n^2: n in [0..30]]; // Vincenzo Librandi, Apr 29 2011
-
Maple
seq(2^n-n^2, n=0..35); # Zerinvary Lajos, Jul 01 2007
-
Mathematica
CoefficientList[Series[(1 - 4*x + 4*x^2 + x^3)/((1 - x)^3(1 - 2x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 13 2012 *) Table[2^n - n^2, {n, 0, 39}] (* Alonso del Arte, Dec 16 2012 *)
-
Maxima
A024012(n):=2^n-n^2$ makelist(A024012(n),n,0,20); /* Martin Ettl, Dec 18 2012 */
-
PARI
a(n)=2^n-n^2 \\ Charles R Greathouse IV, Apr 17 2012
Formula
G.f.: (1 - 4*x + 4*x^2 + x^3)/((1 - 2*x)*(1 - x)^3). - Vincenzo Librandi, Jul 13 2012
a(n) = 5*a(n - 1) - 9*a(n - 2) + 7*a(n - 3) - 2*a(n - 4). - Vincenzo Librandi, Jul 13 2012
Extensions
More terms from Hugo Pfoertner, Oct 18 2004
Comments