cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A024012 a(n) = 2^n - n^2.

This page as a plain text file.
%I A024012 #47 Jul 08 2025 17:25:39
%S A024012 1,1,0,-1,0,7,28,79,192,431,924,1927,3952,8023,16188,32543,65280,
%T A024012 130783,261820,523927,1048176,2096711,4193820,8388079,16776640,
%U A024012 33553807,67108188,134216999,268434672,536870071,1073740924,2147482687,4294966272,8589933503,17179868028,34359737143
%N A024012 a(n) = 2^n - n^2.
%C A024012 The sequence 2^(n-2) - (n-2)^2, n=7,8,... enumerates the number of non-isomorphic sequences of length n, with entries from {1,2,3} and no two adjacent entries the same, that contain each of the thirteen rankings of three players (111, 121, 112, 211, 122, 212, 221, 123, 132, 213, 231, 312, 321) as embedded order isomorphic subsequences.  See the arXiv paper below for proof.  If n=7, these sequences are 1213121, 1213212, 1231213, 1231231,1231321, 1232123, and 1232132, and for each case, there are 3!=6 isomorphs. - _Anant Godbole_, Feb 20 2013
%D A024012 GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
%H A024012 Vincenzo Librandi, <a href="/A024012/b024012.txt">Table of n, a(n) for n = 0..1000</a>
%H A024012 Anant Godbole and Martha Liendo, <a href="http://arxiv.org/abs/1302.4668">Waiting time distribution for the emergence of superpatterns</a>, arxiv 1302.4668 [math.PR], 2013.
%H A024012 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,7,-2).
%F A024012 G.f.: (1 - 4*x + 4*x^2 + x^3)/((1 - 2*x)*(1 - x)^3). - _Vincenzo Librandi_, Jul 13 2012
%F A024012 a(n) = 5*a(n - 1) - 9*a(n - 2) + 7*a(n - 3) - 2*a(n - 4). - _Vincenzo Librandi_, Jul 13 2012
%p A024012 seq(2^n-n^2, n=0..35); # _Zerinvary Lajos_, Jul 01 2007
%t A024012 CoefficientList[Series[(1 - 4*x + 4*x^2 + x^3)/((1 - x)^3(1 - 2x)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jul 13 2012 *)
%t A024012 Table[2^n - n^2, {n, 0, 39}] (* _Alonso del Arte_, Dec 16 2012 *)
%o A024012 (Magma) [2^n-n^2: n in [0..30]]; // _Vincenzo Librandi_, Apr 29 2011
%o A024012 (PARI) a(n)=2^n-n^2 \\ _Charles R Greathouse IV_, Apr 17 2012
%o A024012 (Maxima) A024012(n):=2^n-n^2$ makelist(A024012(n),n,0,20); /* _Martin Ettl_, Dec 18 2012 */
%Y A024012 Cf. A072180 (2^n - n^2 is prime), A075896 (primes of the form 2^n - n^2), A099481 (2^n - n^2 is a semiprime), A099482 (semiprimes of the form 2^n - n^2).
%K A024012 sign,easy
%O A024012 0,6
%A A024012 _N. J. A. Sloane_
%E A024012 More terms from _Hugo Pfoertner_, Oct 18 2004