OFFSET
1,1
COMMENTS
p is always a prime factor of n as well.
Except for the case n=6, p is always the greatest prime factor of n.
(n/p) is an upper bound on the rest of the prime factors 'q' of n, so always q <= (n/p).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
David Morales Marciel, Euler's Totient function statement proposal
EXAMPLE
For n = 4, phi(n) = 2, p = (phi(n)/2)+1 = 2, is prime and is a prime factor of 4.
For n = 6, phi(n) = 2, p = (phi(n)/2)+1 = 2, is prime and is a prime factor of 6.
MATHEMATICA
aQ[n_] := Divisible[n, 1 + EulerPhi[n] / 2]; Select[Range[400], aQ] (* Amiram Eldar, Nov 06 2019 *)
PROG
(Python)
from sympy import totient
[n for n in range(1, 10**5) if n%((totient(n)/2)+1)==0]
(PARI) isok(n) = (n % (eulerphi(n)/2+1)) == 0; \\ Michel Marcus, Apr 20 2015
(Magma) [k:k in [1..370]| IsIntegral(k/(EulerPhi(k)/2+1))]; // Marius A. Burtea, Nov 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
David Morales Marciel, Apr 19 2015
EXTENSIONS
Removed long Python code, and added very simple Python program (two lines) with sympy as suggested by the Editor.
STATUS
approved