login
A340339
a(n) is the least prime p such that n*p+b is prime, where b=1 if n is even or 2 if n is odd, and p > a(n-1) if n >= 2.
2
3, 5, 7, 13, 19, 23, 47, 71, 73, 97, 109, 139, 173, 239, 241, 271, 283, 307, 353, 443, 449, 499, 547, 563, 593, 647, 683, 709, 739, 743, 761, 809, 839, 859, 877, 907, 941, 971, 991, 1009, 1021, 1049, 1103, 1217, 1237, 1291, 1297, 1319, 1499, 1559, 1619, 1663, 1747, 1777, 1811, 1997, 2053, 2161
OFFSET
1,1
LINKS
FORMULA
A340340(n) = n*a(n)+A000034(n).
EXAMPLE
a(4) = 13 because 13 is the least prime p > 7 such that 4*p+1 is prime.
MAPLE
f:= proc(n, p0)
local p, a, v;
if n::odd then a:= 2 else a:= 1 fi;
p:= p0;
do p:= nextprime(p)
until isprime(n*p+a);
return p
end proc:
p:= 2: R:= NULL:
for n from 1 to 100 do
p:= f(n, p);
R:= R, p;
od:
R;
CROSSREFS
Sequence in context: A065384 A354217 A338567 * A126108 A100859 A336369
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 04 2021
STATUS
approved