login
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
2, 5, 5, 5, 67, 5, 7, 19, 107, 61, 67, 7, 5, 103, 263, 13, 83, 197, 17, 1097, 709, 103, 2731, 367, 271, 353, 1951, 43, 1109, 113, 457, 131, 67, 197, 1427, 199, 379, 7, 1901, 367, 3889, 8387, 97, 367, 2297, 613, 89, 6263, 2017, 127, 2647, 911, 8831, 45949, 4051, 2671, 2927, 883, 4423, 4027, 11
OFFSET
0,1
LINKS
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
Cf. A340694.
Sequence in context: A082086 A082084 A094236 * A205444 A270705 A073101
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 21 2021
STATUS
approved