OFFSET
1,2
COMMENTS
Every number n >= (k+2)*(k+1)*k*(k-1) - 1 = A069756(k) is of the form r*k^2 + s*(k+1)^2 with r, s and k positive integers. For any n >= 1, a(n) gives the minimum value of r + s for n = r*k^2 + s*(k+1)^2.
FORMULA
EXAMPLE
7 = 2^2 + 3*1^2, the sum of the coefficients of the linear combination is 1+3 = 4; The only other linear combination of consecutive squares giving 7 is 7*1^2 + 0, thus a(7) = 4, the minimum sum of the coefficients.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Christophe Hervé, Nov 01 2015
STATUS
approved