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

 


Record differences between prime(n+3) and prime(n). Records in A031165.
1

%I #8 Oct 31 2013 12:17:37

%S 5,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,42,46,50,54,58,60,

%T 62,64,68,78,84,112,116,118,120,126,128,142,152,170,178,184,192,194,

%U 198,208,210,216,220,222,252,258,270,300,318,336,348,354,370,408

%N Record differences between prime(n+3) and prime(n). Records in A031165.

%C This is the k=3 case of the set of sequences "records in a(k,n) = prime(n+k) - prime(n)." The k=1 case is given by A005250 (ncreasing gaps between primes), A000101 [increasing gaps between primes (upper end)] and A002386, which gives lower ends of these gaps. The k=2 case is A031132. The merits of these records are (prime(n+3)-prime(n))/log (prime(n)). The first record merit is 5/log 2 = 16.6096405. The second record merit is 8/log 3 = 16.7672262.

%e a(1) = A031165(1) = prime(4) - prime(1) = 7 - 2 = 5, which is the only odd element of this sequence.

%e a(2) = A031165(2) = prime(5) - prime(2) = 11 - 3 = 8.

%e a(3) = A031165(4) = prime(7) - prime(4) = 17 - 7 = 10.

%e a(4) = A031165(7) = prime(10) - prime(7) = 29 - 17 = 12.

%e a(5) = A031165(9) = prime(12) - prime(9) = 37 - 23 = 14.

%t NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; d = 0; p = 1; q = 2; r = 3; s = 5; lst = {}; Do[{p, q, r, s} = {q, r, s, NextPrim[s]}; If[s > d + p, d = s - p; AppendTo[lst, d]; Print[d]], {n, 10^8}] (* _Robert G. Wilson v_ *)

%Y Cf. A000040, A000101, A001223, A002386, A005250, A007530, A031131, A031132, A031165.

%K easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Jan 22 2006

%E Corrected and extended by _Robert G. Wilson v_, Jan 23 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 16:16 EDT 2024. Contains 376178 sequences. (Running on oeis4.)