ran into  issues when attempting to verify F(50\!,123)=17888 >> solution is unwieldy and needs to be rewritten to handle input > 10 ** 5 more effeciently >> also need to understand why F(12\!,12) is not evaluating correctly (=11) but F(84,4) does evaluate correctly (=3)