login
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
3, 5, 11, 29, 97, 149, 211, 307, 1847, 1931, 3109, 3251, 4201, 5557, 5981, 6521, 10831, 11777, 12889, 30631, 33287, 35023, 36433, 81509, 86677, 95701, 103289, 106087, 153247, 181361, 189127, 190471, 288647, 294629, 326437, 399353, 507289, 515041
OFFSET
0,1
LINKS
FORMULA
a(n) = A256454(n)+2n for n>0. - Robert G. Wilson v, Mar 30 2015
EXAMPLE
149 - 139 = 10, the first time this gap was seen after smaller gaps of 1,2,4,6,8.
MAPLE
A[0]:= 3:
p:=3:
n:= 1:
for i from 1 to 10^5 do
q:= nextprime(p);
gap:= q - p;
if gap = 2*n then
A[n]:= q;
n:= n+1;
fi;
p:= q;
od:
seq(A[i], i=1..n); # Robert Israel, Jan 18 2015
MATHEMATICA
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 *)
PROG
(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++); }
CROSSREFS
Sequence in context: A095302 A335367 A000101 * A037152 A084748 A265784
KEYWORD
nonn,easy
AUTHOR
Bill McEachen, Jan 17 2015
STATUS
approved