login
The OEIS is supported by the many generous donors to the OEIS 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

%I #9 Jan 05 2021 10:52:20

%S 3,5,7,13,19,23,47,71,73,97,109,139,173,239,241,271,283,307,353,443,

%T 449,499,547,563,593,647,683,709,739,743,761,809,839,859,877,907,941,

%U 971,991,1009,1021,1049,1103,1217,1237,1291,1297,1319,1499,1559,1619,1663,1747,1777,1811,1997,2053,2161

%N 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.

%H Robert Israel, <a href="/A340339/b340339.txt">Table of n, a(n) for n = 1..10000</a>

%F A340340(n) = n*a(n)+A000034(n).

%e a(4) = 13 because 13 is the least prime p > 7 such that 4*p+1 is prime.

%p f:= proc(n, p0)

%p local p, a, v;

%p if n::odd then a:= 2 else a:= 1 fi;

%p p:= p0;

%p do p:= nextprime(p)

%p until isprime(n*p+a);

%p return p

%p end proc:

%p p:= 2: R:= NULL:

%p for n from 1 to 100 do

%p p:= f(n,p);

%p R:= R, p;

%p od:

%p R;

%Y Cf. A000034, A340340.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 04 2021

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)