login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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