OFFSET
1,1
COMMENTS
{0, 1, n+1, n^2+n+1, a(n)} is the lexicographically first set of 5 nonnegative integers with the property that the sum of any n nondecreasing terms (repetitions allowed) is unique.
LINKS
M. B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
M. B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
Kevin O'Bryant, B_h-sets and Rigidity, arXiv:2312.10910 [math.NT], 2023.
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = floor((n + 3)/2) * n^2 + floor((3*n + 2)/2), proved in arXiv:2311.14021.
G.f.: x*(-x^6 + x^5 + 5*x^4 - x^3 + 8*x^2 + 8*x + 4)/((x - 1)*(x^2 - 1)^3). - Chai Wah Wu, Feb 28 2024
E.g.f.: ((2 + 7*x + 5*x^2 + x^3)*cosh(x) + (1 + 6*x + 6*x^2 + x^3)*sinh(x) - 2)/2. - Stefano Spezia, Mar 09 2024
EXAMPLE
a(2) = 12, as all 15 nonincreasing sums from {0,1,3,7,12}, namely 0+0 < 0+1 < 1+1 < 0+3 < 1+3 < 3+3 < 0+7 < 1+7 < 3+7 < 0+12 < 1+12 < 7+7 < 3+12 < 7+12 < 12+12, are distinct, and all other 5-element sets of nonnegative integers with this property are lexicographically after {0,1,3,7,12}.
MATHEMATICA
a[n_] := Floor[(n + 3)/2] n^2 + Floor[(3 n + 2)/2]
PROG
(Python)
def A369817(n): return (n+3>>1)*n**2+(3*n+2>>1) # Chai Wah Wu, Feb 28 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kevin O'Bryant, Feb 02 2024
STATUS
approved