%I #21 Dec 25 2019 15:20:01
%S 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,
%T 97,101,103,107,109,113,127,131,133,137,139,149,151,157,163,167,173,
%U 179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269
%N Numbers k such that phi(k)/(sigma(k)-k) is an integer.
%C This sequence consists of all primes p (for which the given ratio equals (p-1)/1, see A000040) and of composites listed in A055940 (see examples).
%C Up to 10^7, there is no element of this sequence having more than 2 prime factors. - _M. F. Hasler_, Dec 11 2007
%H Amiram Eldar, <a href="/A070159/b070159.txt">Table of n, a(n) for n = 1..10000</a>
%H Douglas E. Iannucci, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Iannucci/ian5.html">On the Equation sigma(n) = n + phi(n)</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.6.2.
%F { a(k) } = { n in N | A000010(n)/A001065(n) is an integer }.
%F { a(k) } = { A000040(k) } union { A055940(k) }.
%e The prime p=47 is in this sequence since phi[p]/(sigma[p]-p) = p-1 is an integer, as is the case for any other prime.
%e The composite n=403=13*31 is in this sequence, since the ratio phi(n)/(sigma[n]-n) =360/(1+13+31)=8 is an integer.
%e The first few composites in this sequence are 133,403,583,713,... (A055940).
%t Do[s=EulerPhi[n]/(DivisorSigma[1, n]-n); If[IntegerQ[s], Print[n]], {n, 2, 1000}]
%t Select[Range[2,300],IntegerQ[EulerPhi[#]/(DivisorSigma[1,#]-#)]&] (* _Harvey P. Dale_, Dec 25 2019 *)
%o (PARI) for(n=2,999,eulerphi(n)%(sigma(n)-n) || print1(n",")) \\ _M. F. Hasler_, Dec 11 2007
%Y Cf. A000010, A000040, A001065, A000203, A055940, A070037, A020492, A068418, A062972.
%K nonn
%O 1,1
%A _Labos Elemer_, Apr 26 2002
%E Edited by _M. F. Hasler_, Dec 11 2007