OFFSET
1,1
COMMENTS
a(n) is the least m such that 2*n*prime(m+1)-prime(m) is prime while for all j < n, 2*j*prime(m+1)-prime(m) is not prime.
LINKS
Robert Israel, Table of n, a(n) for n = 1..175
FORMULA
A341284(a(n)) = 2*n*prime(a(n)+1)-prime(a(n)).
EXAMPLE
For k=4, A341284(16) = 419 = 2*4*prime(17)-prime(16) and a(4) = 16.
MAPLE
N:= 60: # for a(1) to a(N)
V:= Vector(N): count:= 0:
g:= proc(n) local k, pn, p1;
pn:= ithprime(n); p1:= ithprime(n+1);
for k from 2*p1-pn by 2*p1 to 2*N*p1-pn do
if isprime(k) then return (k+pn)/(2*p1) fi
od;
N+1
end proc:
for n from 2 while count < N do
v:= g(n);
if v <= N and V[v] = 0 then V[v]:= n; count:= count+1 fi
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 25 2021
STATUS
approved