login

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

a(n) = phi(n^2) - phi(n) = (n-1) * phi(n).
3

%I #19 Jul 11 2019 13:15:09

%S 0,1,4,6,16,10,36,28,48,36,100,44,144,78,112,120,256,102,324,152,240,

%T 210,484,184,480,300,468,324,784,232,900,496,640,528,816,420,1296,666,

%U 912,624,1600,492,1764,860,1056,990,2116,752,2016,980,1600,1224,2704

%N a(n) = phi(n^2) - phi(n) = (n-1) * phi(n).

%H Harry J. Smith, <a href="/A062955/b062955.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A002618(n) - A000010(n). - _Michel Marcus_, Jun 28 2018

%t Table[EulerPhi[n^2]-EulerPhi[n],{n,60}] (* _Harvey P. Dale_, Aug 22 2012 *)

%o (PARI) a(n)=if(n<1,0,eulerphi(n^2)-eulerphi(n))

%o (PARI) { for (n=1, 1000, write("b062955.txt", n, " ", eulerphi(n^2) - eulerphi(n)) ) } \\ _Harry J. Smith_, Aug 14 2009

%Y Cf. A000010, A002618.

%K nonn

%O 1,3

%A _Jason Earls_, Jul 22 2001