cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A059787 Distance between 2*(n-th prime) and next prime.

This page as a plain text file.
%I A059787 #14 May 15 2020 11:58:52
%S A059787 1,1,1,3,1,3,3,3,1,1,5,5,1,3,3,1,9,5,3,7,3,5,1,1,3,9,5,9,5,1,3,1,3,3,
%T A059787 9,5,3,5,3,1,1,5,1,3,3,3,9,3,3,3,1,1,5,1,7,15,3,5,3,1,3,1,3,9,5,7,11,
%U A059787 3,7,3,3,1,5,5,3,3,9,3,7,3,1,11,1,11,3,1,9,5,7,3,3,9,3,1,11,3,1,7,3,5,3,3
%N A059787 Distance between 2*(n-th prime) and next prime.
%C A059787 If a(n)=1 then prime(n) is a Sophie Germain prime.
%H A059787 Robert Israel, <a href="/A059787/b059787.txt">Table of n, a(n) for n = 1..10000</a>
%p A059787 with(numtheory): [seq(nextprime(2*ithprime(k))-2*ithprime(k),k=1..256)];
%t A059787 Table[n2=2Prime[n];NextPrime[n2]-n2,{n,110}] (* _Harvey P. Dale_, Jun 07 2012 *)
%o A059787 (PARI) a(n) = my(pp=2*prime(n)); nextprime(pp) - pp; \\ _Michel Marcus_, Mar 22 2020
%Y A059787 Cf. A005385, A005384.
%K A059787 nonn
%O A059787 1,4
%A A059787 _Labos Elemer_, Feb 22 2001