# Number of non negative integral solutions involving exponents

I know if $$x_1 + x_2 + x_3 + x_4 \leq k$$ then number of integral solution can be given by $${k + 4} \choose 4$$ using Stars and Bars but I am unable to figure out no. of integral solutions of $$x_1 + x_2^2 + x_3^3 + x_4^4 \leq k$$. where $$0\leq x_1, x_2 ,x_3, x_4 \leq 10^3$$ and $$0 \leq k \leq 10^{18}$$. Kindly help.

• The number of nonnegative integer solutions of the inequality $x_1 + x_2 + x_3 + x_4 \leq k$ is the number of nonnegative integer solutions of the equation $x_1 + x_2 + x_3 + x_4 + s = k$, where $s = k - (x_1 + x_2 + x_3 + x_4)$, so you should have obtained $\binom{k + 4}{4}$. – N. F. Taussig Jan 13 at 10:02
• sorry. My Bad. Yes it should be ${k + 4} \choose {4}$. I have edited it – Brij Raj Kishore Jan 13 at 12:20