OFFSET
1,1
COMMENTS
Are there infinitely many such primes?
Are there only finitely many such primes that are not safe primes?
Is their set {2, 3, 13, 17, 19, 31, 37, 43, 79, 223, 367} complete?
It is assumed that there are infinitely many safe primes (and their estimated asymptotic density ~ 1.32/(log n)^2 converges to the actual value as far as we know), so the answer to the first question is certainly "yes". - M. F. Hasler, Jun 14 2021
MATHEMATICA
seqQ[q_] := PrimeQ[q] && Module[{ps = FactorInteger[2^(q - 1) - 1][[;; , 1]]}, AllTrue[ps, Divisible[# - 1, q - 1] || Divisible[q - 1, # - 1] &]]; Select[Range[100], seqQ] (* Amiram Eldar, Jun 09 2020 *)
PROG
(PARI) isok(q) = {if (! isprime(q), return (0)); my(f=factor(2^(q-1)-1)[, 1]~, qq=q-1); for (k=1, #f, my(pp=f[k]-1); if ((qq % pp) && (pp % qq), return(0)); ); return (1); } \\ Michel Marcus, Jun 09 2020
(PARI) is_A334797(n)={isprime(n)&&!foreach(factor(2^n---1)[, 1], p, n%(p-1)&&(p-1)%n&&return)} \\ M. F. Hasler, Jun 14 2021
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
Thomas Ordowski, Jun 09 2020
EXTENSIONS
a(17)-a(38) from Amiram Eldar, Jun 09 2020
a(39)-a(53) from Daniel Suteu, Jun 19 2020
STATUS
approved