A prime-generating recurrence