Finding the first and fifth terms