login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214069 Least m>0 such that prime(n)+m and n-m are relatively prime. 1

%I #8 May 31 2015 17:13:19

%S 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,

%T 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,

%U 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

%N Least m>0 such that prime(n)+m and n-m are relatively prime.

%H Clark Kimberling, <a href="/A214069/b214069.txt">Table of n, a(n) for n = 1..1000</a>

%e gcd(12,10) = 2 and gcd(13,9) = 1, so that a(11) = 2.

%t Table[m = 1; While[GCD[Prime[n] + m, n - m] != 1, m++]; m, {n, 1, 140}]

%o (PARI) vector(100,n,m=1;while(gcd(prime(n)+m,n-m)!=1,m++);m) \\ _Derek Orr_, May 30 2015

%Y Cf. A214052.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, Jul 26 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 11:23 EDT 2024. Contains 375396 sequences. (Running on oeis4.)