login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Distances of increasingly lonely primes to nearest prime.
2

%I #26 Oct 04 2015 03:48:54

%S 1,2,4,6,12,14,18,20,24,30,40,42,44,48,54,62,72,76,96,98,108,116,124,

%T 136,156,160,162,168,174,176,178,180,186,194,210,214,222,242,244,246,

%U 250,258,268,284,300,324,328,340,348,352,390,396,420,432,452,480

%N Distances of increasingly lonely primes to nearest prime.

%C These are the distances mentioned in A023186.

%e The nearest prime to 23 is 4 units away, larger than any previous prime, so 4 is in the sequence.

%t t={}; max=p=0; q=2; Do[r=NextPrime[q]; If[(min=Min[q-p,r-q])>max, max=min; AppendTo[t,max]]; p=q; q=r, {n,828000}]; t (* _Jayanta Basu_, May 18 2013 *)

%Y Related sequences: A023186-A023188, A046929-A046931, A051650, A051652, A051697-A051702, A051728-A051730.

%K nonn

%O 1,2

%A _David W. Wilson_

%E More terms from _Jud McCranie_, Jun 16 2000

%E More terms from _T. D. Noe_, Jul 21 2006

%E More terms from _Dmitry Petukhov_, Oct 03 2015