login
a(n) = phi(n - phi(n)), a(1) = 0.
9

%I #18 Dec 27 2023 12:19:12

%S 0,1,1,1,1,2,1,2,2,2,1,4,1,4,6,4,1,4,1,4,6,4,1,8,4,6,6,8,1,10,1,8,12,

%T 6,10,8,1,8,8,8,1,8,1,8,12,8,1,16,6,8,18,12,1,12,8,16,12,8,1,20,1,16,

%U 18,16,16,22,1,12,20,22,1,16,1,18,24,16,16,18,1,16,18

%N a(n) = phi(n - phi(n)), a(1) = 0.

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

%F a(1) = 0, and for n > 1, a(n) = totient(cototient(n)) = A000010(A051953(n)). - _Antti Karttunen_, Aug 07 2017

%p A051953 := proc(n)

%p n-numtheory[phi](n) ;

%p end proc:

%p A054571 := proc(n)

%p numtheory[phi](A051953(n)) ;

%p end proc: # _R. J. Mathar_, Oct 13 2011

%t Array[EulerPhi[# - EulerPhi@ #] &, 81] (* _Michael De Vlieger_, Aug 07 2017 *)

%o (PARI) A054571(n) = if(1==n,0,eulerphi(n - eulerphi(n))); \\ _Antti Karttunen_, Aug 07 2017

%Y Cf. A000010, A051953, A070556, A290087.

%K nonn

%O 1,6

%A J. Sandor (mstaicu(AT)dualnet.ro), Mar 09 2002

%E Description clarified with a(1) = 0 explicitly set by convention. - _Antti Karttunen_, Aug 07 2017