Question 1020460
.
Your help will be appreciated thanks!
Let a(1)=5. Define a(n) to be (a(n-1))/2 if a(n-1) is even, 3a(n-1)+1 if a(n-1) is odd for all other natural numbers n. 
What is the fourth term of the sequence?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


<pre>
Let us calculate the second term. Since {{{a[1]}}}=5 is odd, {{{a[2]}}} = {{{3*a[1]+1}}} = 3*5+1= 16.

Now calculate the third term. Since {{{a[2]}}}=16 is even, {{{a[3]}}} = {{{a[2]/2}}} = {{{16/2}}} = 8.

Next calculate the fourth term. Since {{{a[3]}}}=8 is even, {{{a[4]}}} = {{{a[3]/2}}} = {{{8/2}}} = 4.
</pre>