login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A357291
a(n) = number of subsets S of {1,2,...,n} having more than 2 elements such that (sum of least two elements of S) < difference between greatest two elements of S.
2
0, 0, 0, 0, 0, 0, 1, 3, 8, 19, 42, 89, 185, 378, 766, 1544, 3102, 6220, 12459, 24939, 49902, 99831, 199692, 399417, 798871, 1597782, 3195608, 6391264, 12782580, 25565216, 51130493, 102261051, 204522172, 409044419, 818088918, 1636177921, 3272355933
OFFSET
0,8
FORMULA
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) + 3*a(n-6) - 2*a(n-7).
G.f.: x^6/((-1 + x)^3 (1 + x) (-1 + 2 x) (1 + x + x^2)).
a(n) ~ A021025*2^n. - Stefano Spezia, Oct 03 2022
a(n) = 2^n/21 - n^2/12 + n/6 + O(1). Conjecture: a(n) = round(2^n/21 - n^2/12 + n/6). - Charles R Greathouse IV, Oct 11 2022
EXAMPLE
The 3 relevant subsets of {1,2,3,4,5,6,7} are {1, 2, 6}, {1, 2, 7}, {1, 2, 3, 7}.
MATHEMATICA
s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 3 &];
a[n_] := Select[s[n], #[[1]] + #[[2]] < #[[-1]] - #[[-2]] &]
Table[Length[a[n]], {n, 0, 15}]
CROSSREFS
Cf. A021025.
Sequence in context: A229198 A095681 A079583 * A099050 A065352 A161993
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 02 2022
STATUS
approved