OFFSET
1,2
COMMENTS
EXAMPLE
MATHEMATICA
psi[n_] := n*Times @@ (1 + 1/FactorInteger[n][[;; , 1]]); psi[1] = 1; Select[Range[200], Length@ FixedPointList[EulerPhi[psi[#1]] &, #] == Length@ FixedPointList[psi[EulerPhi[#1]] &, #] &] (* Amiram Eldar, Aug 04 2023 *)
PROG
(Python)
from sympy.ntheory.factor_ import totient
from sympy import isprime, primefactors, prod
def psi(n):
plist = primefactors(n)
return n*prod(p+1 for p in plist)//prod(plist)
def a364631(n):
i = 1
r = n
while (True):
rc = totient(psi(r))
if (rc == r):
break;
r = rc
i += 1
return i
def a364642(n):
i = 1
r = n
while (True):
rc = psi(totient(r))
if (rc == r):
break;
r = rc
i += 1
return i
# Output display terms.
for n in range(1, 222):
if(a364631(n) == a364642(n)):
print(n, end = ", ")
CROSSREFS
KEYWORD
nonn
AUTHOR
Torlach Rush, Jul 28 2023
STATUS
approved