login
A288888
a(n) is the total number of elements in all sum-free subsets of {1,...,n}.
3
1, 2, 7, 12, 27, 45, 93, 144, 294, 428, 796, 1220, 2186, 3155, 5637, 8102, 13907, 20070, 33746, 47416, 81050, 112226, 184541, 260780, 421222, 577447, 947934, 1304821, 2087701, 2857024, 4535223, 6157288, 9878133, 13257735, 20790674, 28332734, 44304037, 59072318
OFFSET
1,2
COMMENTS
a(n) is the sum of the n-th row of A288887.
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 1..76
Eric Weisstein's World of Mathematics, Sum-Free Set
EXAMPLE
A288887 begins:
1;
1, 1;
2, 2, 3;
3, 2, 4, 3;
5, 3, 7, 5, 7;
...
PROG
(PARI) sumfree(v) = {for(i=1, #v, for (j=1, i, if (setsearch(v, v[i]+v[j]), return (0)); ); ); return (1); }
a(n) = {my(nb = 0); forsubset(n, s, if (#s && sumfree(Set(s)), nb += #s); ); nb; } \\ Michel Marcus, Nov 08 2020
CROSSREFS
Cf. A007865. Rows sums of triangle A288887.
Sequence in context: A242201 A350093 A177747 * A293621 A175879 A102371
KEYWORD
nonn
AUTHOR
Ben Burns, Jun 18 2017
STATUS
approved