OFFSET
1,1
EXAMPLE
MAPLE
g:= proc(n) local i, L, x, y;
L:= select(t -> isprime(t) and isprime(2*n-t), [2, seq(i, i=3..n, 2)]);
x:= convert(L, `+`);
y:= nops(L)*2*n - x;
y mod x
end proc:
select(n -> isprime(2*n+g(n)), [$2..10000]); # Robert Israel, Apr 29 2021
PROG
(PARI) apq(n) = my(s=0, t=0); forprime(p=1, n, if (isprime(2*n-p), s += p; t+= 2*n-p)); t % s;
isok(k) = isprime(2*k + apq(k)); \\ Michel Marcus, Apr 29 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Apr 28 2021
STATUS
approved