Number of solution of Frobenius equation Oke I am trying to find all presentable of a number $n$ as sum $ax+(a+1)y$ where $a=0,1,\ldots$ and $x,y\geq0$ are integers. 
I find that
$5=1+1+1+1+1=1+1+1+2=1+2+2=2+3=5$ so we have $5$ ways.
$7=1+1+1+1+1+1+1=1+1+1+1+1+2=1+1+1+2+2=1+2+2+2=2+2+3=3+4$ so we have $7$ ways.
I suppose that if $p\geq3$ is a prime number then there are exactly $p$ ways. However, I found that
$11=1+1+1+1+1+1+1+1+1+1+1=1+1+1+1+1+1+1+1+1+2=1+1+1+1+1+1+1+2+2=1+1+1+1+1+2+2+2=1+1+1+2+2+2+2=1+2+2+2+2+2$
and
$=2+2+2+2+3=2+3+3+3=3+4+4 =11$ so there are only $10$ ways. 
My question are that: What is the formula for the number ways to preprent a prime $p$ to sum of $x$ numbers $a$ and $y$ numbers $a+1$ where $a,x,y$ are non-negative integers?
 A: This should hold for any $n$, not just $n$ prime. For the induction step from $n-1$ to $n$, note that a generic sum is
$$n-1 = ax + (a+1)y,$$
or
$$n = ax + (a+1)y +1 = a(x-1) + (a+1)(y+1),$$
assuming $x$ is not zero. So in this case, a sum for $n-1$ corresponds to one for $n$. If x is zero, then use
$$n-1= ay,$$
or 
$$n = ay+1= a(y-1) + (a+1),$$
and we again relate a sum in $n-1$ to one in $n$. 
Additionally, you have a new sum of $n$ as $n$ 1s, so the induction step adds 1 breakdown over that for $n-1$.
This needs fleshing out (inversing the step, etc), of course. 
A: The problem is slightly misstated; what you're actually counting is the number of different ways to write $n=ax+(a+1)y$ with $a,x\ge1$ and $y\ge0$, not $a,x,y\ge0$.  Changing the lower limit on $a$ and $x$ rules out what would otherwise be an infinite number of solutions, $(a,x,y)=(0,x,n)$ with $x=0,1,2,\ldots$, as well as double counting the sum $n=1+1+\cdots+1$ as $(0,1,n)$ and $(1,n,0)$ and the "sum" $n=n$ as $(n-1,0,1)$ and $(n,1,0)$.
With this in mind, note that
$$n=ax+(a+1)y=a(x+y)+y=au+y$$
where $u=x+y$ is strictly greater than $y$ (since $x\ge1$). But this means $y$ is the remainder when you divide $u$ into $n$.  So now it's clear what's happening:  for each value $u=1,2,3,\ldots$, there is precisely one way to write $n=au+y$ with $0\le y\lt u$.  But if $u\gt n$, we have $a=0$.  So there are precisely $n$ ways to write $n=au+y$ with $a\ge1$ and $0\le y\lt u$, and these translate into precisely $n$ ways to write $n=a(x+y)+y$ with $a,x\ge1$ and $y\ge0$.   
