A200869 Number of 0..6 arrays x(0..n+1) of n+2 elements without any interior element greater than both neighbors or less than both neighbors.
161, 595, 2163, 7973, 29325, 107777, 395929, 1454643, 5344795, 19638715, 72159035, 265134245, 974183489, 3579448271, 13151993143, 48324463973, 177558916493, 652405957937, 2397139747601, 8807827288183, 32362661242755, 118910351874471
Offset: 1
Keywords
Examples
Some solutions for n=3 ..6....3....0....5....3....0....6....6....2....5....5....2....6....0....5....5 ..6....2....4....1....3....0....6....2....3....2....3....0....4....1....0....2 ..5....2....4....0....2....6....6....2....5....2....1....0....0....1....0....2 ..3....3....4....0....2....6....1....3....5....1....1....3....0....2....2....6 ..2....4....4....5....5....3....0....6....4....0....3....3....0....5....3....6
Links
- R. H. Hardin, Table of n, a(n) for n = 1..210
Programs
-
Mathematica
a[0,x_,y_] := 1; a[n_,x_,y_] := a[n,x,y] = Sum[If[z <=x<= y || y <=x<= z, a[n-1, z, x], 0], {z, 7}]; a[n_] := Sum[a[n, x, y], {x, 7}, {y, 7}]; Array[a, 25] (* Giovanni Resta, Mar 05 2014 *)
Formula
Empirical: a(n) = 4*a(n-1) -3*a(n-2) +4*a(n-3) +9*a(n-4) +7*a(n-6) +6*a(n-7) +a(n-8) +2*a(n-9) +a(n-10).
Empirical g.f.: x*(161 - 49*x + 266*x^2 + 462*x^3 + 93*x^4 + 389*x^5 + 310*x^6 + 70*x^7 + 105*x^8 + 49*x^9) / (1 - 4*x + 3*x^2 - 4*x^3 - 9*x^4 - 7*x^6 - 6*x^7 - x^8 - 2*x^9 - x^10). - Colin Barker, Oct 16 2017
Comments