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.

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.

Terms

    a(0) =0a(1) =0a(2) =2a(3) =3a(4) =7a(5) =5a(6) =11a(7) =7a(8) =0a(9) =19a(10) =19a(11) =11a(12) =23a(13) =13a(14) =53a(15) =0a(16) =31a(17) =17a(18) =0a(19) =19a(20) =0a(21) =101a(22) =43a(23) =23a(24) =47a(25) =131a(26) =0a(27) =139a(28) =0a(29) =29

External references