A288888 a(n) is the total number of elements in all sum-free subsets of {1,...,n}.
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
Keywords
Examples
A288887 begins: 1; 1, 1; 2, 2, 3; 3, 2, 4, 3; 5, 3, 7, 5, 7; ...
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 1..76
- Eric Weisstein's World of Mathematics, Sum-Free Set
Programs
-
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
Comments