Garmin Interview Question

A recursion problem with prime numbers