Fibonacci sequence implementation

From textbook - ISBN in source.