OFFSET
0,6
COMMENTS
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
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).
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
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 *)
PROG
(Magma) [2^n-n^2: n in [0..30]]; // Vincenzo Librandi, Apr 29 2011
(PARI) a(n)=2^n-n^2 \\ Charles R Greathouse IV, Apr 17 2012
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
More terms from Hugo Pfoertner, Oct 18 2004
STATUS
approved