OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = iphi(3) + iphi(iphi(3)) = 2 + 1 = 3.
MATHEMATICA
f[p_, e_] := p^(2^(-1 + Position[Reverse @ IntegerDigits[e, 2], 1])); iphi[1] = 1; iphi[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n]) - 1); a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Mar 28 2020
STATUS
approved