Intereting Posts

Big-O Interpretation
Checking the maximality of a principal ideal in $R$
Bijecting a countably infinite set $S$ and its cartesian product $S \times S$
If $f$,$g$ and $\overline{f}g$ are holomorphic on $\Omega$, then $g=0$ or $f$ is constant
proof verification: If $f:G \rightarrow H$ is group homomorphism, and $H$ is abelian, then $G$ is abelian
Periodic solution of $\dot{x} = a(t) x + b(t)$ with $a$ and $b$ periodic
Does π start with two identical decimal sequences?
At least one monochromatic triangle from $p_n=\lfloor{en!}\rfloor+1$ points
Combinatorial proof for $\sum_{k = 0}^n \binom {r+k} k = \binom {r + n + 1} n$
Limit of a recursive sequence $s_n = (1-\frac{1}{4n^2})s_{n-1}$
Is this $\gcd(0, 0) = 0$ a wrong belief in mathematics or it is true by convention?
Evaluating $\int \sqrt{1 + t^2} dt$?
Homeomorphisms between infinite-dimensional Banach spaces and their spheres
Changing of the limits of integration with the integral metric.
Cumulative Distribution Function of Sum two Weibull random variables

The precise problem is in how many ways I can write a number $n$ as sum of $4$ numbers say $a,b,c,d$ where $a \leq b \leq c \leq d$.

I know about Jacobi’s $4$ square problem which is number of ways to write a number in form of sum of $4$ squares number. There is a direct formula for it. Is there a direct formula for this problem too?

Edit: All the numbers are positive integers greater than $0$.

Example: For $5$ there is only one way $1,1,1,2$.

- Stirling numbers, binomial coefficients
- Showing a set is a subset of another set
- Counting non-isomorphic relations
- Proving the summation formula using induction: $\sum_{k=1}^n \frac{1}{k(k+1)} = 1-\frac{1}{n+1}$
- Relation between bernoulli number recursions
- How does one find a formula for the recurrence relation $a_{1}=1,a_{2}=3, a_{n+2}=a_{n+1}+a_{n}?$

- Why $f\colon \mathbb{Z}_n^\times \to \mathbb{Z}_m^\times$ is surjective?
- What does this music video teach us about 863?
- Golden ratio, $n$-bonacci numbers, and radicals of the form $\sqrt{\frac{1}{n-1}+\sqrt{\frac{1}{n-1}+\sqrt{\frac{1}{n-1}+\cdots}}}$
- number of strictly increasing sequences of length $K$ with elements from $\{1, 2,\cdots,N\}$?
- Finding four numbers
- Proove that $2005$ devides $55555\dots$ with 800 5's
- Prime Harmonic Series $\sum\limits_{p\in\mathbb P}\frac1p$
- Golbach's partitions: is there always one common prime in $G(n)$ and $G(n+6)$ , $n \ge 8$ (or a counterexample)?
- $a-b,a^2-b^2,a^3-b^3…$ are integers $\implies$ $a,b$ are integers?
- Does Fermat's Last Theorem hold for cyclotomic integers in $\mathbb{Q(\zeta_{37})}$?

Note that this problem is equivalent to the problem of partitioning $n$ into $4$ parts.

In number theory, a partition is one in which the order of the parts is unimportant. Under these conditions, we are under the illusion that the order is important, however we can only order any given combination of $4$ parts in $1$ way. Thus, the order is unimportant.

There is a well known recurrence for $p(n,k)$, the number of partitions of $n$ into $k$ parts. It is given by

$$p(n,k) = k\cdotp(n-1,k) + p(n-1,k-1).$$

Your question is only concerned with the case of $k=4$.

You can write a generating function for this problem. Let me generalize your question. For $n\in\mathbb{N}_0$ and $k\in\mathbb{N}$, let $a_k^n$ be the number of ways to write $n$ as a sum $x_1+x_2+\ldots+x_k$ of integers $x_1,x_2,\ldots,x_k$ such that $0\leq x_1\leq x_2 \leq \ldots \leq x_k$.

Observe that this is the same problem as writing $n$ in the form $y_1+2y_2+\ldots+ky_k$, where $y_1,y_2,\ldots,y_k\in\mathbb{N}_0$. To see this, we take $y_k:=x_1$ and $y_{k-i}:=x_{i+1}-x_i$ for $i=1,2,\ldots,k-1$. Hence, the generating function $f_k(t):=\sum_{n=0}^\infty\,a_n^k\,t^k$ is given by $$f_k(t)=\prod_{i=1}^k\left(\sum_{r=0}^\infty\,t^{ir}\right)=\prod_{i=1}^k\,\left(\frac{1}{1-t^i}\right)=\frac{1}{\prod_{i=1}^k\,\left(1-t^i\right)}\,.$$

For example, $f_4(t)=1+t+2t^2+3t^3+5t^4+6t^5+9t^6+11t^7+\ldots$. One not-so-nice recursive formula for $a^n_k$’s is $a^n_k=1+\sum_{j=1}^{k-1}\,\sum_{r=1}^{\left\lfloor n/(j+1)\right\rfloor}a_j^{n-r(j+1)}=a_k^{n-k}+a_{k-1}^{n}$ for $n\in\mathbb{N}_0$ and for integers $k>1$, where $a^n_1=1$ for every $n\in\mathbb{N}_0$ and $a^0_k=1$ for every $k\in\mathbb{N}$. However, I think having the generating function is a sufficient answer. If you want the number of solutions in which $x_1 \geq 1$, then it is easily seen that the answer for each $n$ is $a^{n-k}_k$ if $n \geq k$, and $0$ if $n<k$.

- Noetherian domains with finitely many primes
- Reflexivity, Transitivity, Symmertry of the square of an relation
- Why is an ellipse, hyperbola, and circle not a function?
- Strategies for Factoring Expressions with Four Terms
- Prove $\frac{x+y+z}{3}+\frac{3}{\frac1x+\frac1y+\frac1z}\geq5\sqrt{\frac{xyz}{16}}$
- Inverse Laplace transform of s/s-1
- Does $\sum_{n=1}^\infty \frac{1}{n! \sin(n)}$ diverge or converge?
- Is conjugate of holomorphic function holomorphic?
- $x^p-c$ has no root in a field $F$ if and only if $x^p-c$ is irreducible?
- If $a$ is a zero divisor of $\mathbb{F}$, then does $a$ fail to have a multiplicative inverse?
- Generalised inclusion-exclusion principle
- Continuity of $\arg (z)$
- $AB=BA$ implies $AB^T=B^TA$.
- Fourier Transform of $\frac{1}{(1+x^2)^2}$
- Finding the limit of $\frac{Q(n)}{P(n)}$ where $Q,P$ are polynomials