Added offset nth prime support