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”).

A214069
Least m>0 such that prime(n)+m and n-m are relatively prime.
1
2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 6, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 2, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 6, 1, 2, 1, 2, 2, 6, 1, 2, 2, 2, 1, 4, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2
OFFSET
1,1
LINKS
EXAMPLE
gcd(12,10) = 2 and gcd(13,9) = 1, so that a(11) = 2.
MATHEMATICA
Table[m = 1; While[GCD[Prime[n] + m, n - m] != 1, m++]; m, {n, 1, 140}]
PROG
(PARI) vector(100, n, m=1; while(gcd(prime(n)+m, n-m)!=1, m++); m) \\ Derek Orr, May 30 2015
CROSSREFS
Cf. A214052.
Sequence in context: A161058 A161262 A161287 * A167969 A245192 A235431
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 26 2012
STATUS
approved