login
A214052
Least m>0 such that prime(n)+m and n-m have a common divisor > 1.
3
1, 2, 1, 4, 1, 6, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, 18, 1, 6, 1, 22, 1, 24, 1, 26, 1, 1, 1, 4, 1, 32, 1, 34, 1, 2, 1, 2, 1, 1, 1, 42, 1, 2, 1, 1, 1, 48, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 5, 1, 2, 1, 1, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 1, 1, 2, 1, 2, 1, 82, 1
OFFSET
1,2
LINKS
EXAMPLE
prime(8)=19; gcd(19+1,8-1)=1 and gcd(19+2,8-2)=3, so a(8)=2.
MATHEMATICA
b[n_]:=Prime[n]; c[n_]:=n; Table[m=1; While[GCD[b[n]+m, c[n]-m]==1, m++]; m, {n, 100}]
CROSSREFS
Sequence in context: A241423 A323244 A329642 * A276094 A247339 A281071
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 20 2012
STATUS
approved