login
A334892
Number T(n,k) of k-element subsets of [n] avoiding 3-term arithmetic progressions and containing n if n>0; triangle T(n,k), n>=0, 0<=k<=A003002(n), read by rows.
4
1, 0, 1, 0, 1, 1, 0, 1, 2, 0, 1, 3, 2, 0, 1, 4, 4, 1, 0, 1, 5, 8, 3, 0, 1, 6, 12, 6, 0, 1, 7, 18, 15, 0, 1, 8, 24, 26, 4, 0, 1, 9, 32, 47, 20, 0, 1, 10, 40, 67, 40, 7, 0, 1, 11, 50, 102, 80, 18, 0, 1, 12, 60, 140, 140, 53, 6, 0, 1, 13, 72, 194, 236, 110, 16, 1
OFFSET
0,9
COMMENTS
T(n,k) is defined for all n >= 0 and k >= 0. The triangle contains only elements with 0 <= k <= A003002(n). T(n,k) = 0 for k > A003002(n).
LINKS
Fausto A. C. Cariboni, Rows n = 0..80, flattened (rows n = 0..40 from Alois P. Heinz)
Eric Weisstein's World of Mathematics, Nonaveraging Sequence
FORMULA
T(0,k) = A334187(0,k), T(n,k) = A334187(n,k) - A334187(n-1,k) for n > 0.
EXAMPLE
1;
0, 1;
0, 1, 1;
0, 1, 2;
0, 1, 3, 2;
0, 1, 4, 4, 1;
0, 1, 5, 8, 3;
0, 1, 6, 12, 6;
0, 1, 7, 18, 15;
0, 1, 8, 24, 26, 4;
0, 1, 9, 32, 47, 20;
0, 1, 10, 40, 67, 40, 7;
0, 1, 11, 50, 102, 80, 18;
0, 1, 12, 60, 140, 140, 53, 6;
0, 1, 13, 72, 194, 236, 110, 16, 1;
0, 1, 14, 84, 248, 342, 198, 42, 3;
0, 1, 15, 98, 326, 532, 377, 100, 10;
...
MAPLE
b:= proc(n, s) option remember; `if`(n=0, x, b(n-1, s)+ `if`(
ormap(j-> 2*j-n in s, s), 0, expand(x*b(n-1, s union {n}))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(
`if`(n=0, 1, b(n-1, {n}))):
seq(T(n), n=0..16);
MATHEMATICA
b[n_, s_] := b[n, s] = If[n == 0, x, b[n-1, s] + If[
AnyTrue[s, MemberQ[s, 2#-n]&], 0, Expand[x*b[n-1, s ~Union~ {n}]]]];
T[n_] := If[n == 0, {1}, CoefficientList[b[n-1, {n}], x]];
T /@ Range[0, 16] // Flatten (* Jean-François Alcover, May 03 2021, after Alois P. Heinz *)
CROSSREFS
Columns k=0-3 give: A000007, A057427, A000027(n-1), A007590(n-2).
Row sums give A334893.
Last elements of rows give A334894.
Sequence in context: A197707 A253668 A216220 * A216235 A306914 A317023
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 14 2020
STATUS
approved