login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067603 Least k such that gcd(prime(k)+1, prime(k+1)+1) = 2n. 7
2, 4, 9, 72, 34, 91, 62, 478, 205, 2016, 522, 909, 1440, 5375, 2149, 6610, 7604, 2976, 5229, 7488, 11251, 7499, 8805, 20179, 18526, 70885, 28193, 40985, 33847, 17625, 27069, 77199, 66156, 90764, 26186, 141235, 70317, 856719, 110769, 50523, 217229 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Since all consecutive primes, 2 < p < q, are odd, therefore gcd(p+1, q+1) must be even.

LINKS

Zak Seidov, Robert G. Wilson v, and Charles R Greathouse IV, Table of n, a(n) for n = 1..200 (1..100 terms from Seidov, 101..140 from Wilson, 141..200 from Greathouse)

FORMULA

Conjecture: a(n) = least k such that A001223(k) = 2n and A000040(k) == -1 (mod 2n). - Zak Seidov, Aug 16 2015

EXAMPLE

a(1) = 2, the first entry in A066940,

a(2) = 4, the first entry in A066941,

a(3) = 9, the first entry in A066942,

a(4) = 72, the first entry in A066943,

a(5) = 34, the first entry in A066944.

That is to say that the first k-th prime that has gcd(prime(k+1)+1, prime(k)+1)) of 2, 4, 6, 8, 10, ..., are k = 2, 4, 9, 72, 34, ..., and the prime_k = 3, 7, 23, 359, 139, 467, 293, ... (A067604).

If the floor of GCD is used, then a(0) equals 1.

MATHEMATICA

t = 0*Range@ 70; p = 3; q = 5; While[p < 15*10^6, d = GCD[p + 1, q + 1]/2; If[ t[[d]] == 0, t[[d]] = PrimePi@ p]; p = q; q = NextPrime@ q]; t

PROG

(PARI) a(n) = p=2; q=3; k=1; while(gcd(p+1, q+1) != 2*n, k++; p=q; q = nextprime(p+1); ); k; \\ Michel Marcus, Aug 16 2015

(PARI) a(n)=my(p=2, k=2*n, t); forprime(q=3, , t++; if((q-p)%k==0 && (p+1)%k==0, return(t)); p=q) \\ Charles R Greathouse IV, Aug 17 2015

(PARI) a(n)=my(k=2*n); forstep(p=k-1, oo, k, if(isprime(p) && (nextprime(p+1)-p)%k==0, return(primepi(p)))) \\ Charles R Greathouse IV, Aug 17 2015

(MATLAB)

P = primes(10^8);

G = gcd(P(1:end-1)+1, P(2:end)+1);

A = zeros(1, 66);

for n = 1:66

    A(n) = find(G == 2*n, 1, 'first');

end

A   % Robert Israel, Aug 16 2015

CROSSREFS

Main entry is A067604. Cf. A066940, A066941, A066942, A066943, A066944, A000040, A001223.

Sequence in context: A162117 A162109 A271553 * A269739 A065299 A292114

Adjacent sequences:  A067600 A067601 A067602 * A067604 A067605 A067606

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Jan 31 2002

EXTENSIONS

Edited by Robert G. Wilson v, Aug 17 2015 at the direction of Zak Seidov

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 01:45 EDT 2021. Contains 343830 sequences. (Running on oeis4.)