a(1)=1. For n >=2, a(n) = largest positive integer < a(n-1) that is not coprime to n, if such an integer exists. Otherwise, a(n) = smallest integer > a(n-1) that is not coprime to n.
A139712
a(1)=1. For n >=2, a(n) = largest positive integer < a(n-1) that is not coprime to n, if such an integer exists. Otherwise, a(n) = smallest integer > a(n-1) that is not coprime to n.
Terms
- a(0) =1a(1) =2a(2) =3a(3) =2a(4) =5a(5) =4a(6) =7a(7) =6a(8) =3a(9) =2a(10) =11a(11) =10a(12) =13a(13) =12a(14) =10a(15) =8a(16) =17a(17) =16a(18) =19a(19) =18a(20) =15a(21) =14a(22) =23a(23) =22a(24) =20a(25) =18a(26) =15a(27) =14a(28) =29a(29) =28
External references
- oeis: A139712