OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
EXAMPLE
a(3) = 9 is a term because A340740(9) = 2 is prime.
MAPLE
f:= proc(n) local k;
add(`if`(igcd(k, n)=1, n mod k, 0), k=1..floor(n/2))
end proc:
select(t -> isprime(f(t)), [$1..1000]);
MATHEMATICA
A340741[n_] :=
Position[Table[
PrimeQ[Sum[
Mod[m, i]*Floor[1/GCD[i, m]], {i, Floor[(m - 1)/2]}]], {m, 1,
n}], True] // Flatten;
A340741[404] (* Robert P. P. McKone, Jan 19 2021 *)
PROG
(PARI) isok(n) = isprime(sum(k=1, n\2, if (gcd(k, n)==1, n%k))); \\ Michel Marcus, Jan 18 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 18 2021
STATUS
approved