%I #25 Dec 04 2023 01:37:45
%S 0,1,1,2,1,12,1,4,3,28,1,32,1,52,33,8,1,90,1,64,57,124,1,96,5,172,9,
%T 112,1,324,1,16,129,292,73,204,1,364,177,160,1,612,1,256,153,532,1,
%U 320,7,640,297,352,1,756,145,256,369,844,1,912,1,964,225,32,193,1476,1,592
%N a(n) = n^2 - phi(n)*sigma(n).
%C Always >0 for n>0. a(n)=1 if n is prime.
%C If p is a prime and k is a natural number then a(p^k)=p^(k-1) because a(p^k)=(p^k)^2-sigma(p^k)*phi(p^k) =p^(2k)-(p-1)*p^(k-1)*(p^(k+1)-1)/(p-1)=p^(k-1). If n is a composite number then a(n)>1 and a(1)=0, so n is prime iff a(n)=1. - _Farideh Firoozbakht_, Nov 15 2005
%H T. D. Noe, <a href="/A069249/b069249.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = n^2-A062354(n). - _R. J. Mathar_, Oct 01 2011
%F Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = 1 - A065465 = 0.118486... . - _Amiram Eldar_, Dec 04 2023
%e sigma(10) = 18; phi(10) = 4; 10^2 - sigma(10)*phi(10) = 28. sigma(p) = p+1; phi(p) = p-1; p^2 - (p+1)(p-1) = 1. [From _Walter Nissen_, Aug 29 2009]
%t Table[n^2-EulerPhi[n]DivisorSigma[1,n],{n,70}] (* _Harvey P. Dale_, Oct 22 2016 *)
%o (PARI) a(n)=n^2-eulerphi(n)*sigma(n) \\ _Charles R Greathouse IV_, Nov 27 2013
%Y Cf. A000010, A000203, A065465, A164875, A164876.
%K easy,nonn
%O 1,4
%A _Benoit Cloitre_, Apr 13 2002