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!)
A253899 a(0) = 3, then a(n) is the least prime greater than a(n-1) that follows a gap of exactly 2*n. 2

%I

%S 3,5,11,29,97,149,211,307,1847,1931,3109,3251,4201,5557,5981,6521,

%T 10831,11777,12889,30631,33287,35023,36433,81509,86677,95701,103289,

%U 106087,153247,181361,189127,190471,288647,294629,326437,399353,507289,515041

%N a(0) = 3, then a(n) is the least prime greater than a(n-1) that follows a gap of exactly 2*n.

%H Robert G. Wilson v, <a href="/A253899/b253899.txt">Table of n, a(n) for n = 0..180</a>

%F a(n) = A256454(n)+2n for n>0. - _Robert G. Wilson v_, Mar 30 2015

%e 149 - 139 = 10, the first time this gap was seen after smaller gaps of 1,2,4,6,8.

%p A[0]:= 3:

%p p:=3:

%p n:= 1:

%p for i from 1 to 10^5 do

%p q:= nextprime(p);

%p gap:= q - p;

%p if gap = 2*n then

%p A[n]:= q;

%p n:= n+1;

%p fi;

%p p:= q;

%p od:

%p seq(A[i],i=1..n); # _Robert Israel_, Jan 18 2015

%t lst = {3}; p = 2; q = 3; gp = 2; While[gp != 1000, While[q - p != gp, p = q; q = NextPrime@ p]; AppendTo[lst, q]; Print@ q; gp += 2]; lst (* _Robert G. Wilson v_, Jan 23 2015 *)

%o (PARI) genit(maxx)={n=3; delta=2; print1(n, ", "); ptr=1; while(delta<maxx, p=prime(n-1); q=nextprime(p+1); if(delta==q-p, print1(q, ", "); delta+=2; ptr++); n++); }

%Y Cf. A000101, A000230.

%K nonn,easy

%O 0,1

%A _Bill McEachen_, Jan 17 2015

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 August 9 02:14 EDT 2020. Contains 336310 sequences. (Running on oeis4.)