OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..6672
MATHEMATICA
Flatten@ Position[#, 0] &@ Table[EulerPhi@ n - (n - If[n <= 2, n - 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]]), {n, 240}] (* Michael De Vlieger, Apr 26 2017 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(Python)
from sympy import divisors, totient
from sympy.ntheory.factor_ import core
def a007947(n): return max(i for i in divisors(n) if core(i) == i)
def a079277(n):
k=n - 1
while True:
if a007947(k*n) == a007947(n): return k
else: k-=1
def a285699(n): return 1 if n<2 else n - a079277(n)
print([n for n in range(1, 301) if totient(n) == a285699(n)]) # Indranil Ghosh, Apr 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 26 2017
STATUS
approved