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.

A288888 a(n) is the total number of elements in all sum-free subsets of {1,...,n}.

This page as a plain text file.
%I A288888 #21 Feb 16 2025 08:33:48
%S A288888 1,2,7,12,27,45,93,144,294,428,796,1220,2186,3155,5637,8102,13907,
%T A288888 20070,33746,47416,81050,112226,184541,260780,421222,577447,947934,
%U A288888 1304821,2087701,2857024,4535223,6157288,9878133,13257735,20790674,28332734,44304037,59072318
%N A288888 a(n) is the total number of elements in all sum-free subsets of {1,...,n}.
%C A288888 a(n) is the sum of the n-th row of A288887.
%H A288888 Fausto A. C. Cariboni, <a href="/A288888/b288888.txt">Table of n, a(n) for n = 1..76</a>
%H A288888 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Sum-FreeSet.html">Sum-Free Set</a>
%e A288888 A288887 begins:
%e A288888   1;
%e A288888   1,  1;
%e A288888   2,  2,  3;
%e A288888   3,  2,  4,  3;
%e A288888   5,  3,  7,  5,  7;
%e A288888   ...
%o A288888 (PARI) sumfree(v) = {for(i=1, #v, for (j=1, i, if (setsearch(v, v[i]+v[j]), return (0)););); return (1);}
%o A288888 a(n) = {my(nb = 0); forsubset(n, s, if (#s && sumfree(Set(s)), nb += #s);); nb;} \\ _Michel Marcus_, Nov 08 2020
%Y A288888 Cf. A007865. Rows sums of triangle A288887.
%K A288888 nonn
%O A288888 1,2
%A A288888 _Ben Burns_, Jun 18 2017