# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a364932 Showing 1-1 of 1 %I A364932 #21 Feb 13 2024 14:33:18 %S A364932 1,2,2,2,2,4,4,4,4,6,4,8,6,8,8,8,6,12,8,12,16,12,8,16,8,12,12,16,8,24, %T A364932 16,16,16,18,16,24,18,16,24,24,12,32,20,24,24,24,16,32,24,24,24,24,18, %U A364932 36,24,32,32,24,16,48,30,32,32,32,24,48,32,36,32,48,24 %N A364932 a(n) = phi(psi(n)). %C A364932 Here phi is Euler's totient function and psi is the Dedekind psi function. %C A364932 Values of psi(n), n > 1 are always greater than n, while values of phi(n), n > 1 are always less than n. %C A364932 a(39270) = 41472 is the first term where phi(psi(n)) exceeds n. %H A364932 Robert Israel, Table of n, a(n) for n = 1..10000 %F A364932 a(n) = A000010(A001615(n)). %F A364932 a(2^k) = A000010(2^k), k >= 2. %p A364932 f:= proc(n) local p; numtheory:-phi(n * mul(1+1/p, p = numtheory:-factorset(n))) end proc: %p A364932 map(f, [$1..100]); # _Robert Israel_, Feb 13 2024 %t A364932 a[n_] := EulerPhi[n*Times @@ (1 + 1/FactorInteger[n][[;; , 1]])]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Aug 13 2023 *) %o A364932 (Python) %o A364932 from sympy.ntheory.factor_ import totient %o A364932 from sympy import isprime, primefactors, prod %o A364932 def psi(n): %o A364932 plist = primefactors(n) %o A364932 return n*prod(p+1 for p in plist)//prod(plist) %o A364932 def a(n): return totient(psi(n)) %o A364932 (PARI) a(n) = eulerphi(n * sumdivmult(n, d, issquarefree(d)/d)); \\ _Michel Marcus_, Aug 13 2023 %Y A364932 Cf. A000010, A001615, A293713, A364631. %K A364932 nonn,look %O A364932 1,2 %A A364932 _Torlach Rush_, Aug 13 2023 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE