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.
%I A334187 #53 Feb 16 2025 08:34:00 %S A334187 1,1,1,1,2,1,1,3,3,1,4,6,2,1,5,10,6,1,1,6,15,14,4,1,7,21,26,10,1,8,28, %T A334187 44,25,1,9,36,68,51,4,1,10,45,100,98,24,1,11,55,140,165,64,7,1,12,66, %U A334187 190,267,144,25,1,13,78,250,407,284,78,6,1,14,91,322,601,520,188,22,1 %N A334187 Number T(n,k) of k-element subsets of [n] avoiding 3-term arithmetic progressions; triangle T(n,k), n>=0, 0<=k<=A003002(n), read by rows. %C A334187 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 A334187 Fausto A. C. Cariboni, <a href="/A334187/b334187.txt">Rows n = 0..70, flattened</a> (rows n = 0..40 from Alois P. Heinz) %H A334187 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/NonaveragingSequence.html">Nonaveraging Sequence</a> %H A334187 Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic progression</a> %H A334187 Wikipedia, <a href="https://en.wikipedia.org/wiki/Salem-Spencer_set">Salem-Spencer set</a> %H A334187 <a href="/index/No#non_averaging">Index entries related to non-averaging sequences</a> %F A334187 T(n,k) = Sum_{j=0..n} A334892(j,k). %F A334187 T(n,A003002(n)) = A262347(n). %e A334187 Triangle T(n,k) begins: %e A334187 1; %e A334187 1, 1; %e A334187 1, 2, 1; %e A334187 1, 3, 3; %e A334187 1, 4, 6, 2; %e A334187 1, 5, 10, 6, 1; %e A334187 1, 6, 15, 14, 4; %e A334187 1, 7, 21, 26, 10; %e A334187 1, 8, 28, 44, 25; %e A334187 1, 9, 36, 68, 51, 4; %e A334187 1, 10, 45, 100, 98, 24; %e A334187 1, 11, 55, 140, 165, 64, 7; %e A334187 1, 12, 66, 190, 267, 144, 25; %e A334187 1, 13, 78, 250, 407, 284, 78, 6; %e A334187 1, 14, 91, 322, 601, 520, 188, 22, 1; %e A334187 1, 15, 105, 406, 849, 862, 386, 64, 4; %e A334187 1, 16, 120, 504, 1175, 1394, 763, 164, 14; %e A334187 ... %p A334187 b:= proc(n, s) option remember; `if`(n=0, 1, b(n-1, s)+ `if`( %p A334187 ormap(j-> 2*j-n in s, s), 0, expand(x*b(n-1, s union {n})))) %p A334187 end: %p A334187 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, {})): %p A334187 seq(T(n), n=0..16); %t A334187 b[n_, s_] := b[n, s] = If[n == 0, 1, b[n-1, s] + If[AnyTrue[s, MemberQ[s, 2 # - n]&], 0, Expand[x b[n-1, s ~Union~ {n}]]]]; %t A334187 T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, {}]]; %t A334187 T /@ Range[0, 16] // Flatten (* _Jean-François Alcover_, May 30 2020, after Maple *) %Y A334187 Columns k=0-4 give: A000012, A000027, A000217(n-1), A212964(n-1), A300760. %Y A334187 Row sums give A051013. %Y A334187 Last elements of rows give A262347. %Y A334187 Cf. A003002, A334892. %K A334187 nonn,tabf %O A334187 0,5 %A A334187 _Alois P. Heinz_, May 14 2020