Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 4500 articles have referenced us, often saying "we would not have discovered this result without the OEIS".
A085107
Starting with n-1 go on adding the numbers less than n and coprime to it in descending order until one gets a prime. a(n) = this prime, or 0 if no such number exists.