The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A340777 a(n) is the first prime p such that p*2^n+q*3^n and p*3^n+q*2^n are both prime, where q is the prime following p. 1

%I #12 Jun 29 2021 17:10:26

%S 2,5,5,5,67,5,7,19,107,61,67,7,5,103,263,13,83,197,17,1097,709,103,

%T 2731,367,271,353,1951,43,1109,113,457,131,67,197,1427,199,379,7,1901,

%U 367,3889,8387,97,367,2297,613,89,6263,2017,127,2647,911,8831,45949,4051,2671,2927,883,4423,4027,11

%N a(n) is the first prime p such that p*2^n+q*3^n and p*3^n+q*2^n are both prime, where q is the prime following p.

%H Robert Israel, <a href="/A340777/b340777.txt">Table of n, a(n) for n = 0..1337</a>

%e a(3) = 5 because 5*2^3+7*3^3 = 229 and 5*3^n+7*2^n = 191 are prime.

%p f:= proc(n) local p,q;

%p q:= 2;

%p do

%p p:= q; q:= nextprime(q);

%p until isprime(p*2^n+q*3^n) and isprime(p*3^n + q*2^n);

%p p

%p end proc:

%p map(f, [$0..100]);

%t fpp[n_]:=Module[{p=2},While[!PrimeQ[p 2^n+NextPrime[p]3^n]|| !PrimeQ[p 3^n+ NextPrime[ p]2^n],p=NextPrime[p]];p]; Array[fpp,70,0] (* _Harvey P. Dale_, Jun 29 2021 *)

%o (PARI) a(n) = my(p=2, q=nextprime(p+1)); while(! (isprime(p*2^n+q*3^n) && isprime(p*3^n + q*2^n)), p=q; q=nextprime(p+1)); p; \\ _Michel Marcus_, Jan 21 2021

%Y Cf. A340694.

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 21 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 May 16 20:35 EDT 2024. Contains 372555 sequences. (Running on oeis4.)