A247867 a(n) is the smallest prime in the interval [k*sqrt(k), k*sqrt(k+2)], where k = A001359(n), or a(n)=0 if there is no prime in this interval.
0, 13, 37, 71, 157, 263, 457, 599, 1019, 1109, 1607, 1823, 2399, 2647, 2767, 3433, 3697, 4421, 4721, 5501, 6469, 8581, 8951, 9901, 11897, 13577, 14669, 15329, 16229, 16921, 23011, 23531, 23789, 25097, 26153, 32531, 33107, 33997, 34583, 36037, 39079, 43093
Offset: 1
Keywords
Examples
For n=1, k=A001359(1)=3, we have the interval [3*sqrt(3), 3*sqrt(5)] = [5.1...,6.7...] which does not contain a prime. So, a(1)=0. For n=2, k=5, we have the interval [5*sqrt(5), 5*sqrt(7)] = [11.1..., 13.2...] which contains only one prime: 13. So, a(2)=13.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
p:= 1: q:= 2: count:= 0: while count < 100 do if q = p+2 then count:= count+1; r:= nextprime(floor(p*sqrt(p))); if r^2 < p^2*q then A[count]:= r else A[count]:= 0 fi; fi; p:= q; q:= nextprime(p); od: seq(A[i],i=1..100); # Robert Israel, Apr 08 2018
-
PARI
lista(nn) = {forprime(p=2, nn, if (isprime(q=p+2), pmin = nextprime(ceil(p*sqrt(p))); if (pmin <= floor(p*sqrt(q)), val = pmin, val = 0); print1(val, ", ");););} \\ Michel Marcus, Sep 25 2014
Extensions
More terms from Michel Marcus, Sep 25 2014
Comments