OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..1337
EXAMPLE
a(3) = 5 because 5*2^3+7*3^3 = 229 and 5*3^n+7*2^n = 191 are prime.
MAPLE
f:= proc(n) local p, q;
q:= 2;
do
p:= q; q:= nextprime(q);
until isprime(p*2^n+q*3^n) and isprime(p*3^n + q*2^n);
p
end proc:
map(f, [$0..100]);
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 21 2021
STATUS
approved