Give a recursive definition of (a) the set of odd positive integers (i.e., {1, 3, 5, 7, ...}). (b) the set of positive integer powers of 3 (i.e., {3, 9, 27, 81, ...})

Respuesta :

Answer: See each part below.

For a recursive routine, we need to have a starting value. Then, we give the change that is happening.

Part A: We are starting with the number 1 and adding 2 each time.

Part B: We are starting with the number 3 and multiplying by 3 each time.