OFFSET
0,3
COMMENTS
Given the function defined by f(x) = -x^2 + n, the area of each rectangle inscribed under the parabola associated with f and on the x-axis is modeled by the function g(x) = 2x*(-x^2 + n), where 2x is the base of the rectangle and ( -x^2 +n) is its height. The value of x that maximizes the area is x = sqrt(n/3). However, this value is not always an integer, so x should be chosen as the nearest integer to sqrt(n/3), which corresponds to floor(1/2 + sqrt(n/3 - 1/12)).
FORMULA
a(n) = 2*floor(1/2 + sqrt(n/3 - 1/12))*(-(floor(1/2 + sqrt(n/3 - 1/12)))^2 + n).
CROSSREFS
KEYWORD
nonn
AUTHOR
Gonzalo MartÃnez, Aug 17 2024
STATUS
approved