This is an old revision of the document!


Lazy evaluation

1. Consider the following recurrence scheme described informally below. Use it to build the sequence $ 1, 2, \ldots, n!, \ldots$

     4  4*5   4*5*6  ...
  3  3  3     3
  ----------------------
  3 3*4 3*4*5 3*4*5*6 ...    

2. Define the sequence $ 1, \frac{1}{2}, \ldots, \frac{1}{k!}, \ldots $

3. Write a function which takes a sequence $ (a_n)_{n\geq 0}$ and computes the sequence $ (s_n)_{n\geq 0}$ where $ s_k = \sum_{k\geq 0} a_k$ .