Problem:
Let x1​,x2​,…,xn​ be a sequence of integers such that
(i) −1≤xi​≤2, for i=1,2,3,…,n;
(ii) x1​+x2​+⋯+xn​=19; and
(iii) x12​+x22​+⋯+xn2​=99.
Let m and M be the minimal and maximal possible values of x13​+x23​+⋯+xn3​, respectively. Then M/m=
Answer Choices:
A. 3
B. 4
C. 5
D. 6
E. 7
Solution:
Let a,b, and c denote the number of −1's, 1's, and 2's in the sequence, respectively. We need not consider the zeros. Then a,b,c are nonnegative integers satisfying −a+b+2c=19 and a+b+4c=99. It follows that a=40−c and b=59−3c, where 0≤c≤19 (since b≥0), so
x13​+x23​+⋯+xn3​=−a+b+8c=19+6c.
The lower bound is achieved when c=0(a=40,b=59). The upper bound is achieved when c=19(a=21,b=2). Thus m=19 and M=133, so M/m=7.