|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the sum of the n-th row of A288887.
|
|
LINKS
|
|
|
EXAMPLE
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|