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.

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.

This page as a plain text file.
%I A334892 #35 Feb 16 2025 08:34:00
%S A334892 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,
%T A334892 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,
%U A334892 1,12,60,140,140,53,6,0,1,13,72,194,236,110,16,1
%N 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.
%C A334892 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).
%H A334892 Fausto A. C. Cariboni, <a href="/A334892/b334892.txt">Rows n = 0..80, flattened</a> (rows n = 0..40 from Alois P. Heinz)
%H A334892 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/NonaveragingSequence.html">Nonaveraging Sequence</a>
%H A334892 Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic progression</a>
%H A334892 Wikipedia, <a href="https://en.wikipedia.org/wiki/Salem-Spencer_set">Salem-Spencer set</a>
%H A334892 <a href="/index/No#non_averaging">Index entries related to non-averaging sequences</a>
%F A334892 T(0,k) = A334187(0,k), T(n,k) = A334187(n,k) - A334187(n-1,k) for n > 0.
%e A334892   1;
%e A334892   0, 1;
%e A334892   0, 1,  1;
%e A334892   0, 1,  2;
%e A334892   0, 1,  3,  2;
%e A334892   0, 1,  4,  4,   1;
%e A334892   0, 1,  5,  8,   3;
%e A334892   0, 1,  6, 12,   6;
%e A334892   0, 1,  7, 18,  15;
%e A334892   0, 1,  8, 24,  26,   4;
%e A334892   0, 1,  9, 32,  47,  20;
%e A334892   0, 1, 10, 40,  67,  40,   7;
%e A334892   0, 1, 11, 50, 102,  80,  18;
%e A334892   0, 1, 12, 60, 140, 140,  53,   6;
%e A334892   0, 1, 13, 72, 194, 236, 110,  16,  1;
%e A334892   0, 1, 14, 84, 248, 342, 198,  42,  3;
%e A334892   0, 1, 15, 98, 326, 532, 377, 100, 10;
%e A334892   ...
%p A334892 b:= proc(n, s) option remember; `if`(n=0, x, b(n-1, s)+ `if`(
%p A334892       ormap(j-> 2*j-n in s, s), 0, expand(x*b(n-1, s union {n}))))
%p A334892     end:
%p A334892 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(
%p A334892             `if`(n=0, 1, b(n-1, {n}))):
%p A334892 seq(T(n), n=0..16);
%t A334892 b[n_, s_] := b[n, s] = If[n == 0, x, b[n-1, s] + If[
%t A334892      AnyTrue[s, MemberQ[s, 2#-n]&], 0, Expand[x*b[n-1, s ~Union~ {n}]]]];
%t A334892 T[n_] := If[n == 0, {1}, CoefficientList[b[n-1, {n}], x]];
%t A334892 T /@ Range[0, 16] // Flatten (* _Jean-François Alcover_, May 03 2021, after _Alois P. Heinz_ *)
%Y A334892 Columns k=0-3 give: A000007, A057427, A000027(n-1), A007590(n-2).
%Y A334892 Row sums give A334893.
%Y A334892 Last elements of rows give A334894.
%Y A334892 Cf. A003002, A334187.
%K A334892 nonn,tabf
%O A334892 0,9
%A A334892 _Alois P. Heinz_, May 14 2020