added function to find nth value for determined lucas or fibonacci function