login
Sum of digits of Euler totient function of n.
2

%I #24 Sep 08 2022 08:44:32

%S 1,1,2,2,4,2,6,4,6,4,1,4,3,6,8,8,7,6,9,8,3,1,4,8,2,3,9,3,10,8,3,7,2,7,

%T 6,3,9,9,6,7,4,3,6,2,6,4,10,7,6,2,5,6,7,9,4,6,9,10,13,7,6,3,9,5,12,2,

%U 12,5,8,6,7,6,9,9,4,9,6,6,15,5,9,4,10,6,10

%N Sum of digits of Euler totient function of n.

%H Antti Karttunen, <a href="/A004085/b004085.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A007953(A000010(n)). - _Michel Marcus_, Dec 18 2016

%p f:= n -> convert(convert(numtheory:-phi(n),base,10),`+`):

%p map(f, [$1..100]); # _Robert Israel_, Dec 05 2017

%t Total/@(IntegerDigits/@EulerPhi[Range[70]]) (* _Harvey P. Dale_, Jul 31 2013 *)

%t Table[Plus@@IntegerDigits@(EulerPhi[n]),{n,100}] (* _Vincenzo Librandi_, Jun 01 2019 *)

%o (PARI) a(n) = sumdigits(eulerphi(n)); \\ _Michel Marcus_, Dec 18 2016

%o (Magma) [ &+Intseq(EulerPhi(n)): n in [1..100] ]; // _Vincenzo Librandi_, Jun 01 2019

%Y Cf. A000010, A007953, A077651.

%K nonn,base

%O 1,3

%A _N. J. A. Sloane_