login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340741
Numbers k such that A340740(k) is prime.
2
7, 8, 9, 11, 12, 13, 15, 18, 19, 28, 31, 32, 34, 36, 44, 46, 47, 51, 52, 62, 64, 67, 69, 70, 73, 83, 88, 109, 110, 112, 128, 148, 153, 159, 189, 190, 192, 206, 212, 214, 222, 224, 226, 244, 245, 261, 267, 269, 280, 282, 283, 287, 300, 305, 312, 315, 319, 323, 366, 370, 378, 381, 388, 394, 404
OFFSET
1,1
LINKS
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