OFFSET
1,2
COMMENTS
All terms > 2 are congruent to 0 or 4 (mod 6).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(10) = 24 is a term because 24 = 3*8 with 3+8 = 11 prime.
MAPLE
filter:= proc(n) local F, t;
F:= select(t -> t^2 <=n, numtheory:-divisors(n));
ormap(isprime, map(t -> t+n/t, F))
end proc:
select(filter, [$1..300]);
MATHEMATICA
q[n_] := AnyTrue[Divisors[n], PrimeQ[# + n/#] &]; Select[Range[200], q] (* Amiram Eldar, Jul 11 2022 *)
PROG
(PARI) isok(k) = fordiv(k, d, if (isprime(d+k/d), return(1))); \\ Michel Marcus, Jul 11 2022
(Python)
from sympy import divisors, isprime
def ok(n): return any(isprime(d+n//d) for d in divisors(n, generator=True))
print([k for k in range(1, 210) if ok(k)]) # Michael S. Branicky, Jul 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 11 2022
STATUS
approved