Closest prime to n that is different from n (break ties by taking the smaller prime).
A051698
Closest prime to n that is different from n (break ties by taking the smaller prime).
Terms
- a(0) =2a(1) =2a(2) =3a(3) =2a(4) =3a(5) =3a(6) =5a(7) =5a(8) =7a(9) =7a(10) =11a(11) =13a(12) =11a(13) =11a(14) =13a(15) =13a(16) =17a(17) =19a(18) =17a(19) =17a(20) =19a(21) =19a(22) =23a(23) =19a(24) =23a(25) =23a(26) =23a(27) =29a(28) =29a(29) =31
External references
- oeis: A051698