# Lines upon Numbers

Number Theory Level 3

The 4-digit integer $$\overline{wxyz}$$ can be written as $$a^3 w + b^2 + cy + dz$$.

If $$abc + bcd + abd + acd + abcd + 2a + 3b + 4c + 5d + a^2 + b^2 + c^2 + d^2$$ is equal to another 4-digit integer $$\overline{klmn}$$, what is the value of $$k^2 + l^2 + m^2 + n^2 + 2k + 2l + 2m + 2n + klmn$$?

×