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.

A334893 Number of subsets of [n] avoiding 3-term arithmetic progressions and containing n if n>0.

This page as a plain text file.
%I A334893 #30 Feb 16 2025 08:34:00
%S A334893 1,1,2,3,6,10,17,25,41,63,109,165,262,412,643,932,1459,2163,3212,4601,
%T A334893 6817,9904,14741,20906,30352,43993,63540,89442,132037,187587,266842,
%U A334893 378061,535907,751709,1077809,1499972,2084027,2951390,4114165,5651914,7968177
%N A334893 Number of subsets of [n] avoiding 3-term arithmetic progressions and containing n if n>0.
%H A334893 Fausto A. C. Cariboni, <a href="/A334893/b334893.txt">Table of n, a(n) for n = 0..80</a>
%H A334893 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/NonaveragingSequence.html">Nonaveraging Sequence</a>
%H A334893 Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic progression</a>
%H A334893 Wikipedia, <a href="https://en.wikipedia.org/wiki/Salem-Spencer_set">Salem-Spencer set</a>
%H A334893 <a href="http://oeis.org/wiki/Index_to_OEIS:_Section_No#non_averaging">Index entries related to non-averaging sequences</a>
%p A334893 b:= proc(n, s) option remember; `if`(n<1, 1, b(n-1, s)+
%p A334893      `if`(ormap(j-> 2*j-n in s, s), 0, b(n-1, s union {n})))
%p A334893     end:
%p A334893 a:= n-> b(n-1, {n}):
%p A334893 seq(a(n), n=0..23);
%t A334893 b[n_, s_] := b[n, s] = If[n < 1, 1, b[n-1, s] +
%t A334893      If[AnyTrue[s, MemberQ[s, 2 # - n]&], 0, b[n-1, s ~Union~ {n}]]];
%t A334893 a[n_] := b[n-1, {n}];
%t A334893 a /@ Range[0, 23] (* _Jean-François Alcover_, May 03 2021, after _Alois P. Heinz_ *)
%Y A334893 Row sums of A334892.
%Y A334893 Partial sums give A051013.
%K A334893 nonn
%O A334893 0,3
%A A334893 _Alois P. Heinz_, May 14 2020