1
$\begingroup$

Let $G(1) = 0, \ G(2) = 1$, $G(2n+1) = 2 + G(n) + G(n+1)$ and $G(2n) = 1 + G(n), \ \ n \geq 1$

Find $G(n) $

P.S: This is little problem in my problem. I tried to solve by using generating function, but I can not. Can anyone help me. Thanks in advance.

  • 3
    Please consider accepting answers to your previous questions. You've asked 10 questions so far, almost all of which have been answered.2011-12-27
  • 0
    Yeah, I accepted2011-12-27
  • 3
    @qwerty89 By accepting he meant that you click on the tick symbol next to the answer you want to accept.2011-12-27
  • 0
    @Matt: I dont understand. Can you give me a picture to easy understanding. Thanks a lot.2011-12-27
  • 2
    @qwerty89 Look here: http://meta.math.stackexchange.com/questions/3286/how-do-i-accept-an-answer/3287#32872011-12-27
  • 2
    Thanks, I understood. Anyone can help me solve above problem. Thanks !2011-12-27
  • 0
    $G(2n+1)=2+G(n)+G(n+1)$ & $G(2n)=1+G(n)$ $\Leftrightarrow$ $ G(2n+1)=G(2n)+G(2n+2)$ & $G(2n)=1+G(n)$. And $G(2^n)=n,\ G(2^n+1)=(n+1)(n+2)/2,\ G(2^n+2^{n-1})=n+2$.2011-12-28
  • 0
    Every n can be repersented as $2^{p_0}(2^{p_m}(...(2^{p_1}+1)...+1)+1)$, $p_0 \ge 0$, $p_i \ge 1$. Besides, $G(2^p n)=p+G(n)$, $G(2^p n+1)=(p+1)(p+2)/2-1+pG(n)+G(n+1)$, $G(2^p n+2)=(p+1)p/2+(p-1)G(n)+G(n+1)$.2012-11-18
  • 0
    $H_{ m }(p_{ m },p_{ m-1 },...,p_{ 1 })=G(2^{ p_{ m } }(2^{ p_{ m-1 } }(...(2^{ p_{ 1 } }+1)...)+1)+1)$, $\left\{\begin{matrix} H_{ n }=(p_{ n }+1)({p_{ n }+2})/2+p_{ n }H_{n-1}+{ H }'_{ n -1} \\ { H }'_{ n }=(p_n+1)p_n/2+(p_n-1)H_{n-1}+{ H }'_{ n -1} \end{matrix}\right.$2012-11-22

0 Answers 0