login
A342027
a(n) is the least m such that A341284(m) = 2*n*prime(m+1) - prime(m).
2
2, 3, 6, 16, 24, 42, 23, 50, 47, 133, 138, 67, 161, 106, 30, 675, 455, 338, 697, 137, 488, 692, 189, 934, 1863, 1552, 518, 450, 2036, 1815, 2856, 3635, 6784, 8781, 2787, 2790, 99, 11396, 3903, 2539, 9722, 1851, 6399, 7388, 6592, 24371, 12408, 14059, 32846, 21934, 13490, 72170, 42106, 15469, 45948
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
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
Cf. A341284.
Sequence in context: A109162 A215659 A028688 * A343197 A030753 A003040
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 25 2021
STATUS
approved