# Recursive Algorithm

23. Give a recursive algorithm for computing n * a using only addition, where n is a positive integer and a is a real number (add a to itself n times).

© BrainMass Inc. brainmass.com October 9, 2019, 8:52 pm ad1c9bdddfhttps://brainmass.com/math/discrete-math/finding-recursive-algorithm-165503

#### Solution Preview

Recall that a recursive definition of a sequence includes the initial value (or set of initial values) and then a formula for finding the nth term given the values of one or more previous terms. For example, a recursive definition for the sequence, 1, 2, 4, 8, ..., would be given as follows: a(0) = 1 (this is the initial term) and for all k greater than 0, a(k) = 2a(k-1) (which is the recursive formula).

So, the first step for coming up with ...

#### Solution Summary

A recursive algorithm is found, step-by-step.

$2.19