%I #36 Mar 02 2022 09:18:07
%S 1,1,2,6,24,114,6,674,44,2,4714,294,30,2,37754,2272,276,16,2,340404,
%T 20006,2236,216,16,2,3412176,193896,20354,2200,156,16,2,37631268,
%U 2056012,206696,20738,1908,160,16,2,452745470,23744752,2273420,215024,21136,1616,164,16,2
%N Triangle read by rows: number of permutations of [1..n] with k progressions of rise 2, distance 1 and length 3 (n >= 0, k >= 0).
%H Alois P. Heinz, <a href="/A216716/b216716.txt">Rows n = 0..21, flattened</a>
%H K. J. Parsons, <a href="http:///hdl.handle.net/11021/23093">Arithmetic progressions in permutations</a>, Thesis, Washington and Lee University, 2011
%H Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, <a href="http://math.ku.edu/~ilambert/CN.pdf">Arithmetic Progressions in Permutations</a>, 2012. [broken link]
%e Triangle begins:
%e 1
%e 1
%e 2
%e 6 [this is for n=3]
%e 24
%e 114 6
%e 674 44 2
%e 4714 294 30 2
%e 37754 2272 276 16 2
%e 340404 20006 2236 216 16 2
%e 3412176 193896 20354 2200 156 16 2
%e 37631268 2056012 206696 20738 1908 160 16 2
%e ...
%p b:= proc(s, x, y) option remember; expand(`if`(s={}, 1, add(
%p `if`(x>0 and x-y=2 and y-j=2, z, 1)*b(s minus {j}, y, j), j=s)))
%p end:
%p T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b({$1..n}, 0$2)):
%p seq(T(n), n=0..12); # _Alois P. Heinz_, Apr 13 2021
%t b[s_, x_, y_] := b[s, x, y] = Expand[If[s == {}, 1, Sum[
%t If[x > 0 && x - y == 2 && y - j == 2, z, 1]*
%t b[s ~Complement~ {j}, y, j], {j, s}]]];
%t T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0,
%t Exponent[p, z]}]][b[Range[n], 0, 0]];
%t Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Mar 02 2022, after _Alois P. Heinz_ *)
%Y Row sums give A000142.
%Y Column k=0 gives A174072.
%K nonn,tabf
%O 0,3
%A _N. J. A. Sloane_, Sep 15 2012
%E More terms from _Alois P. Heinz_, Apr 13 2021
|