login
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