  We use recurrence equations (alias difference equations) to enumerate the
number of formula-representations of positive integers using only addition and
multiplication, and using addition, multiplication, and exponentiation, where
all the inputs are ones. We also describe efficient algorithms for the random
generation of such representations, and use Dynamical Programming to find a
shortest possible formula representing any given positive integer.

Combinatorics