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.

A216724 Triangle read by rows: T(n,k) is the number of permutations of [1..n] with k modular progressions of rise 2, distance 1 and length 3 (n >= 0, k >= 0).

This page as a plain text file.
%I A216724 #24 Mar 06 2022 08:41:38
%S A216724 1,1,2,3,3,24,0,100,15,0,5,594,108,18,0,4389,504,119,21,0,7,35744,
%T A216724 3520,960,64,32,0,325395,31077,5238,927,207,27,0,9,3288600,288300,
%U A216724 42050,8800,900,100,50,0,36489992,2946141,409827,59785,9174,1518,319,33,0,11
%N A216724 Triangle read by rows: T(n,k) is the number of permutations of [1..n] with k modular progressions of rise 2, distance 1 and length 3 (n >= 0, k >= 0).
%D A216724 Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, Congressus Numerantium, Vol. 208 (2011), pp. 147-165.
%H A216724 Alois P. Heinz, <a href="/A216724/b216724.txt">Rows n = 0..18, flattened</a>
%e A216724 Triangle begins:
%e A216724         1
%e A216724         1
%e A216724         2
%e A216724         3      3
%e A216724        24      0
%e A216724       100     15     0    5
%e A216724       594    108    18    0
%e A216724      4389    504   119   21   0   7
%e A216724     35744   3520   960   64  32   0
%e A216724    325395  31077  5238  927 207  27  0 9
%e A216724   3288600 288300 42050 8800 900 100 50 0
%e A216724   ...
%p A216724 b:= proc(s, x, y, n) option remember; expand(`if`(s={}, 1, add(
%p A216724      `if`(x>0 and irem(n+x-y, n)=2 and irem(n+y-j, n)=2, z, 1)*
%p A216724         b(s minus {j}, y, j, n), j=s)))
%p A216724     end:
%p A216724 T:= n-> (p-> seq(coeff(p, z, i), i=0..max(0,
%p A216724          iquo(n-1,2)*2-1)))(b({$1..n}, 0$2, n)):
%p A216724 seq(T(n), n=0..11);  # _Alois P. Heinz_, Apr 13 2021
%t A216724 b[s_, x_, y_, n_] := b[s, x, y, n] = Expand[If[s == {}, 1, Sum[
%t A216724      If[x>0 && Mod[n + x - y, n] == 2 && Mod[n + y - j, n] == 2, z, 1]*
%t A216724      b[s~Complement~{j}, y, j, n], {j, s}]]];
%t A216724 T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, Max[0,
%t A216724      Quotient[n - 1, 2]*2 - 1]}]][b[Range[n], 0, 0, n]];
%t A216724 Table[T[n], {n, 0, 11}] // Flatten (* _Jean-François Alcover_, Mar 06 2022, after _Alois P. Heinz_ *)
%Y A216724 Column 1 is A174073.
%Y A216724 Row sums are A000142.
%Y A216724 Cf. A216716, A216718, A216719, A216722.
%K A216724 nonn,tabf
%O A216724 0,3
%A A216724 _N. J. A. Sloane_, Sep 15 2012
%E A216724 More terms from _Alois P. Heinz_, Apr 13 2021