Given n, how many ways can we write n as a sum of one or more positive integers a_1 ≤ a_2 ≤ ... ≤ a_k with a_k - a_1 = 0 or 1
\[a_1 ≤ a_2 ≤ ... ≤ a_k \] with \[a_k - a_1 = 0 or 1\]
@Hero
@satellite73
@waterineyes
@Yahoo! @hartnn
you didnt call me panlac thats the problem
@nickhouraney
oh i dont know
@ash2326 @.Sam.
@hartnn
even i did not understand the question....
Don't know sorry.. @mukushla may help you...
@mathslover
Allow me to do some thinking here. First off, we have some small examples: \(1\longrightarrow 1\) way. \(2\longrightarrow 1\) way. \(3\longrightarrow 2\) ways. \(4\longrightarrow 3\) ways. \(5\longrightarrow 3\) ways. \(6\longrightarrow 5\) ways. \(7\longrightarrow 5\) ways. \(8\longrightarrow 6\) ways.
I believe that your solution will be either this, or something very similar. \[\Large \sum_{k=1}^{\left\lfloor \frac{n}{2} \right\rfloor}\left\lceil\frac{n}{k}\right\rceil\]
It's not quite that, but it's similar. It might be\[\Large \sum_{k=1}^{\left\lfloor \frac{n}{2} \right\rfloor}\left\lfloor\frac{n}{k+1}\right\rfloor\]If it is this, then for \(n=9\), it predicts that the solution will be \[4+3+2+1=10\]
If we work it out, we get \[1+1+1+1+1+1+1+1+1\]\[1+1+1+1+1+1+1+2\]\[1+1+1+1+1+2+2\]\[1+1+1+2+2+2\]\[1+2+2+2+2\]\[2+2+2+3\]\[3+3+3\]\[4+5\]Which is 8 ways. (Also, \(n=8\) actually has 7 ways and not 6.)
This is an interesting problem. I think I'm close, but I'm not there yet.
I'll have to come back to this later.
okay, thanks
@mukushla
ahh...misread it the other day...let me think again
i believe that answer is \(n\) way ... i'll post my solution later.
you're right
this was just a tricky one
I agree as well. I'll wait for @mukushla's solution though since I don't have an actual proof yet, and his is probably better.
there is only one way for each \( 1\le k\le n\). we can rewrite the equation as\[a_1+a_2+...+a_k=n\]\[ma_1+(k-m)(a_1+1)=n\ \ \ \ \ \ \ \ \ 1\le m \le k \]\[a_1=\frac{n+m}{k}-1\] if \(k \mid n \) then it is immediate that \(m=k\) and \(a_1=\frac{n}{k}\)...exactly one way for this case. if \(k \nmid n\) then we have\[\frac{n}{k}-1< \frac{n}{k}+\frac{1}{k}-1=\frac{n+1}{k}-1\le a_1 \le \frac{n+k-1}{k}-1=\frac{n}{k}-\frac{1}{k} <\frac{n}{k}\]\[\frac{n}{k}-1 <a_1<\frac{n}{k}\]it gives \(a_1=\left \lfloor \frac {n}{k}\right \rfloor\) and \(m=k(\left \lfloor \frac {n}{k}\right \rfloor+1)-n \) ...one way for this case.
Join our real-time social learning platform and learn together with your friends!