login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

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

Cf. A000034, A340340.

Sequence in context: A155189 A065384 A338567 * A126108 A100859 A336369

Adjacent sequences:  A340336 A340337 A340338 * A340340 A340341 A340342

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Jan 04 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 17 17:39 EDT 2021. Contains 345085 sequences. (Running on oeis4.)