login
a(n) is the first prime p such that p*2^n+q*3^n is prime, where q is the prime following p.
2

%I #51 Jan 21 2021 10:46:04

%S 2,2,5,2,5,5,7,7,5,19,7,7,5,103,7,5,7,37,5,7,31,7,211,5,197,7,17,23,7,

%T 5,5,67,17,7,7,19,127,7,7,11,7,29,79,167,79,43,89,101,17,127,89,17,

%U 137,173,71,31,73,163,67,5,11,211,31,109,67,13,7,199,97,137,109,263,107,5,101,17,283

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

%H Robert Israel, <a href="/A340694/b340694.txt">Table of n, a(n) for n = 0..4400</a>

%e a(2) = 5 because 5*2^2+7*3^2 = 83 is prime, while 3*2^2+5*3^2 = 57 and 2*2^2+3*3^2 = 35 are not.

%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);

%p p

%p end proc:

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

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

%K nonn

%O 0,1

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