Generate fibonacci numbers using dynamic programming.