This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A301618 #13 May 26 2018 17:21:19 %S A301618 8,15,14,35,20,63,14,24,32,143,38,195,20,27,50,323,56,399,26,54,68, %T A301618 575,34,90,32,39,86,899,92,1023,38,84,44,65,110,1443,44,51,122,1763, %U A301618 128,1935,50,114,140,2303,62,119,56,63,158,2915,64,90,62,144,176,3599,182,3843 %N A301618 Least k > n such that gcd(k+1,n+1) > gcd(k,n) > 1. %F A301618 If p is a prime, a(p) = p*(p+2). %F A301618 a(n) >= A299143(n). - _Michel Marcus_, Mar 26 2018 %e A301618 From _Michael De Vlieger_, Apr 21 2018: (Start) %e A301618 a(1) is not defined since 1 is coprime to all numbers. %e A301618 a(2) = 8 since gcd(2,8) = 2 and gcd(3,9) = 3. Of numbers 3 <= m < 8, gcd(2,m) > 1 for m even, but gcd(3,m+1) = 1. %e A301618 a(3) = 15 since gcd(3,15) = 3 and gcd(4,16) = 4. Of numbers 4 <= m < 15, gcd(3,m) > 1 for 3 | m, but gcd(4,m+1) = 1. (End) %t A301618 Array[Block[{k = # + 1}, While[Not[GCD[k + 1, # + 1] > GCD[k, #] > 1], k++]; k] &, 60, 2] (* _Michael De Vlieger_, Apr 21 2018 *) %o A301618 (PARI) a(n) = {my(k = n+1); while((gcd(k,n) == 1) || (gcd(k+1,n+1) <= gcd(k,n)), k++); k;} \\ _Michel Marcus_, Mar 26 2018 %Y A301618 Cf. A299143. %K A301618 nonn %O A301618 2,1 %A A301618 _Alex Ratushnyak_, Mar 24 2018