login
Numbers n such that there is no x < n such that sigma(x) = phi(n).
3

%I #18 Jun 03 2019 07:56:19

%S 1,3,4,6,11,17,22,23,32,34,40,46,47,48,53,59,60,67,71,83,85,89,94,101,

%T 106,107,115,118,125,128,131,134,136,137,141,142,149,160,166,167,170,

%U 173,177,178,179,184,188,191,192,197,202,204,214,227,230,233,235,236

%N Numbers n such that there is no x < n such that sigma(x) = phi(n).

%H Robert Israel, <a href="/A069825/b069825.txt">Table of n, a(n) for n = 1..1000</a>

%p with(numtheory): A069825 := proc(n) local p,i; p := phi(n); for i from 1 to n-1 do if sigma(i) = p then RETURN(NULL) fi od; n end; # _Peter Luschny_, Nov 02 2010

%p # Alternative:

%p N:= 1000: # to get terms <= N

%p R:= Vector(N):

%p for k from 1 to N-1 do

%p s:= numtheory:-sigma(k);

%p if s <= N and R[s] = 0 then R[s]:= k fi;

%p od:

%p 1, op(select(t -> R[numtheory:-phi(t)]=0, [$2..N])); # _Robert Israel_, Aug 25 2017

%t okQ[n_] := NoneTrue[Range[n-1], DivisorSigma[1,#] == EulerPhi[n]&];

%t Select[Range[250], okQ] (* _Jean-François Alcover_, Jun 03 2019 *)

%o (PARI) for(n=1,600,if(abs(prod(i=1,n-1,eulerphi(n)-sigma(i)))>0,print1(n,",")))

%K easy,nonn

%O 1,2

%A _Benoit Cloitre_, Apr 28 2002