OFFSET
0,5
FORMULA
Conjectures from Chai Wah Wu, Nov 21 2023: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 4*a(n-3) - 5*a(n-4) + 2*a(n-5) for n > 4.
G.f.: x^3*(x - 1)/((2*x - 1)*(x^4 - 2*x^3 + x^2 - 2*x + 1)). (End)
EXAMPLE
The set s = {1,2,3,6,7,8} has the following sums of pairs of distinct elements: {3,4,5,7,8,9,10,11,13,14,15}. This does not include 6, so s is not counted under a(8).
The a(0) = 0 through a(6) = 17 subsets:
. . . {1,2,3} {1,2,3} {1,2,3} {1,2,3}
{1,2,4} {1,2,4} {1,2,4}
{1,2,3,4} {1,2,5} {1,2,5}
{1,2,3,4} {1,2,6}
{1,2,3,5} {1,2,3,4}
{1,3,4,5} {1,2,3,5}
{1,2,3,4,5} {1,2,3,6}
{1,3,4,5}
{1,3,4,6}
{1,3,5,6}
{1,2,3,4,5}
{1,2,3,4,6}
{1,2,3,5,6}
{1,2,4,5,6}
{1,3,4,5,6}
{2,3,4,5,6}
{1,2,3,4,5,6}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], MemberQ[Total/@Subsets[#, {2}], Length[#]]&]], {n, 0, 10}]
PROG
(Python)
from itertools import combinations
def A367396(n): return sum(1 for k in range(3, n+1) for w in (set(d) for d in combinations(range(1, n+1), k)) if any({a, k-a}<=w for a in range(1, k+1>>1))) # Chai Wah Wu, Nov 21 2023
CROSSREFS
The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum, linear combination, or semi-sum of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free semi-full semi-free
-----------------------------------------------------------
A364534 counts sum-full subsets.
Triangles:
A365541 counts subsets with a semi-sum k.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 21 2023
EXTENSIONS
a(18)-a(33) from Chai Wah Wu, Nov 21 2023
a(34) from Paul Muljadi, Nov 24 2023
STATUS
approved