Function $C$ is defined on positive integers as follows: \[C(n) = \begin{cases} \dfrac n 2 & \text{if $n$ is even}, \\ 3n+1 & \text{if $n$ is odd}. \end{cases}\] What is the value of \[C(1) + C(2) + C(3) + C(4) + \cdots + C(99) + C(100)?\]
We can compute c(n) for each n from 1 to 100, and then add them up to find the sum of c(1) + c(2) + c(3) + ... + c(100).
For n = 1, c(n) = 3n + 1 = 4 For n = 2, c(n) = n/2 = 1 For n = 3, c(n) = 3n + 1 = 10 For n = 4, c(n) = n/2 = 2 For n = 5, c(n) = 3n + 1 = 16 For n = 6, c(n) = n/2 = 3 For n = 7, c(n) = 3n + 1 = 22 For n = 8, c(n) = n/2 = 4 For n = 9, c(n) = 3n + 1 = 28 For n = 10, c(n) = n/2 = 5 For n = 11, c(n) = 3n + 1 = 34 For n = 12, c(n) = n/2 = 6 For n = 13, c(n) = 3n + 1 = 40 For n = 14, c(n) = n/2 = 7 For n = 15, c(n) = 3n + 1 = 46 For n = 16, c(n) = n/2 = 8 For n = 17, c(n) = 3n + 1 = 52 For n = 18, c(n) = n/2 = 9 For n = 19, c(n) = 3n + 1 = 58 For n = 20, c(n) = n/2 = 10 For n = 21, c(n) = 3n + 1 = 64 For n = 22, c(n) = n/2 = 11 For n = 23, c(n) = 3n + 1 = 70 For n = 24, c(n) = n/2 = 12 For n = 25, c(n) = 3n + 1 = 76 For n = 26, c(n) = n/2 = 13 For n = 27, c(n) = 3n + 1 = 82 For n = 28, c(n) = n/2 = 14 For n = 29, c(n) = 3n + 1 = 88 For n = 30, c(n) = n/2 = 15 For n = 31, c(n) = 3n + 1 = 94 For n = 32, c(n) = n/2 = 16 For n = 33, c(n) = 3n + 1 = 100 For n = 34, c(n) = n/2 = 17 For n = 35, c(n) = 3n + 1 = 106 For n = 36, c(n) = n/2 = 18 For n = 37, c(n) = 3n + 1 = 112 For n = 38, c(n) = n/2 = 19 and so on.
When we add up all the values, we get 7250.