number theoryrecurrence relationpower of 2geometrybir tinga qimmat ekan boru
Problem Statement
Let n be a natural number. We define sequences ⟨ai⟩ and ⟨bi⟩ of integers as follows. We let a0=1 and b0=n. For i>0, we let (ai,bi)=⎩⎨⎧(2ai−1+1,bi−1−ai−1−1)(ai−1−bi−1−1,2bi−1+1)(ai−1,bi−1)if ai−1<bi−1,if ai−1>bi−1,if ai−1=bi−1.
Given that ak=bk for some natural number k, prove that n+3 is a power of two.