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!)
A120627 Least positive k such that both prime(n)+k and prime(n)+2k are prime, or 0 if no such k exists. 6

%I #20 Oct 11 2019 15:03:55

%S 0,2,6,6,6,24,6,12,18,12,6,30,6,18,6,18,12,6,6,18,54,24,24,12,6,6,24,

%T 30,42,18,12,18,30,12,24,6,36,18,6,54,84,30,36,18,30,12,30,54,6,42,18,

%U 12,36,6,6,48,12,6,30,36,24,54,30,36,18,36,18,30,6,24,48,30,6,24,30,18,30

%N Least positive k such that both prime(n)+k and prime(n)+2k are prime, or 0 if no such k exists.

%C Note that 6 divides a(n) for n>2. - _T. D. Noe_, Aug 29 2006

%C Van der Corput's theorem: There are infinitely many positive integers n, k such that n, n+nk, n+2nk are all prime. - _Jonathan Vos Post_, Apr 17 2007

%H T. D. Noe, <a href="/A120627/b120627.txt">Table of n, a(n) for n = 1..10000</a>

%H Terence Tao, <a href="http://terrytao.wordpress.com/2007/04/05/simons-lecture-i-structure-and-randomness-in-fourier-analysis-and-number-theory/">Simons Lecture I: Structure and randomness in Fourier analysis and number theory</a>, April 2007.

%H J. G. van der Corput, <a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN002279932">Über Summen von Primzahlen und Primzahlquadraten</a>, Math. Ann. 116 (1939), 1-50.

%e a(3)=6 because prime(3)=5 and 5+6 and 5+12 are primes.

%t f[n_] := Block[{p = Prime[n], k = 1}, If[n == 1, 0, While[ ! PrimeQ[p + 2k] || ! PrimeQ[p + 4k], k++ ]; 2k] ]; Table[f[n], {n, 80}] (* _Ray Chandler_, Aug 28 2006 *)

%t Join[{0}, Table[p=Prime[n]; k=2; While[ !PrimeQ[p+k] || !PrimeQ[p+2k], k=k+2]; k, {n,2,100}]] - _T. D. Noe_, Aug 29 2006

%o (PARI) a(n)=if(n<2,0, my(p=prime(n),k); while(!isprime(p+k++)||!isprime(p+2*k), ); k) \\ _Charles R Greathouse IV_, Apr 24 2015

%Y Cf. A000040.

%K easy,nonn

%O 1,2

%A _Giovanni Teofilatto_, Aug 25 2006

%E Edited and extended by _Ray Chandler_ and _T. D. Noe_, Aug 28 2006

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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)