login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = phi(n)^n - n^phi(n), where phi(n) is Euler's totient function.
1

%I #21 Sep 08 2022 08:46:13

%S 0,-1,-1,0,399,28,162287,61440,9546255,1038576,74062575399,16756480,

%T 83695120256591,78356634560,35181809198207,281470681743360,

%U 246486713303685957375,101559922656192,604107995057426434824791,1152921479006846976

%N a(n) = phi(n)^n - n^phi(n), where phi(n) is Euler's totient function.

%C a(n) < n^n/e. If n is prime, a(n)/n^n = (1-1/n)^n - 1/n -> 1/e as n -> infinity. - _Robert Israel_, Sep 18 2015

%H Robert Israel, <a href="/A261768/b261768.txt">Table of n, a(n) for n = 1..388</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>

%F a(n) = A000010(n)^n - n^A000010(n) = A000010(n)^n - A062981(n).

%p seq(numtheory:-phi(n)^n - n^numtheory:-phi(n),n=1..30); # _Robert Israel_, Sep 18 2015

%t Table[EulerPhi[n]^n - n^EulerPhi[n], {n, 1, 20}]

%o (PARI) a(n) = eulerphi(n)^n - n^eulerphi(n) \\ _Anders Hellström_, Aug 31 2015

%o (Magma) [EulerPhi(n)^n-n^EulerPhi(n): n in [1..20]]; // _Vincenzo Librandi_, Sep 01 2015

%Y Cf. A000010, A062981.

%K sign

%O 1,5

%A _Ilya Gutkovskiy_, Aug 31 2015