OFFSET
0,3
COMMENTS
The cardinality of the set for n is A034856(n-1).
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = A002817(n) - 3 for n > 1.
From Alois P. Heinz, Aug 27 2024: (Start)
G.f.: x^2*(2*x^4-7*x^3+8*x^2-3*x-3)/(x-1)^5.
a(n) = max(0,(n^4+2*n^3+3*n^2+2*n-24)/8). (End)
E.g.f.: exp(x)*(x^4/8 + x^3 + 2*x^2 + x - 3) + 2*x + 3. - Stefano Spezia, Aug 28 2024
EXAMPLE
For n = 3 the starting set is {1,2,3} and there are subsets {1,2}{1,3}{2,3}{1,2,3} that sum to 3,4,5 and 6 and the sum of distinct sums (3+4+5+6) is 18.
MATHEMATICA
Join[{0, 0}, Nest[PolygonalNumber, Range[2, 50], 2] - 3] (* Paolo Xausa, Sep 13 2024 *)
PROG
(Python)
a = lambda n: max(0, (n**4+2*n**3+3*n**2+2*n-24)//8)
print([a(n) for n in range(1, 40)])
(Python)
def A375764(n): return (m:=n*(n+1)-4)*(m+10)>>3 if n>1 else 0 # Chai Wah Wu, Aug 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Darío Clavijo, Aug 26 2024
EXTENSIONS
More terms from Alois P. Heinz, Aug 27 2024
STATUS
approved