OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
EXAMPLE
gcd(23+1,12-1) = 1 and gcd(23+2,12-2) > 1, so that a(12) = 2.
MATHEMATICA
b[n_] := 2*n - 1; c[n_] := n;
Table[m = 1; While[GCD[b[n] + m, c[n] - m] == 1, m++]; m, {n, 1, 150}]
lmg[n_]:=Module[{m=1}, While[GCD[2n-1+m, n-m]<2, m++]; m]; Array[lmg, 90] (* Harvey P. Dale, Jan 14 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 24 2012
STATUS
approved