login
A264031
Minimum of the sum r + s of the coefficients of a linear combination of consecutive squares r*k^2 + s*(k+1)^2 equals to n, with r, s and k >=0.
0
1, 2, 3, 1, 2, 3, 4, 2, 1, 4, 5, 3, 2, 5, 6, 1, 3, 2, 7, 5, 4, 3, 8, 6, 1, 4, 3, 7, 6, 5, 4, 2, 7, 3, 5, 1, 8, 7, 6, 5, 2, 8, 4, 6, 5, 9, 8, 3, 1, 2, 9, 5, 7, 6, 10, 9, 3, 7, 5, 10, 2, 8, 7, 1, 10, 3, 8, 6, 11, 7, 9, 2, 4, 11, 3, 9, 7, 12, 8, 5, 1
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
a(k^2) = 1, a(A001105(k)) = 2 for k > 0 and a(A230812(k)) = 2; for any other values, a(n) >= 3.
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
STATUS
approved