Text this: A polynomial time algorithm for prime recognition