login
Numbers n such that 1 = abs(sum{p-1|p is prime and divisor of n} - product{p-1|p is prime and divisor of n}).
1

%I #15 Sep 17 2020 06:40:35

%S 6,10,12,14,18,20,22,24,26,28,30,34,36,38,40,44,46,48,50,52,54,56,58,

%T 60,62,68,72,74,76,80,82,86,88,90,92,94,96,98,100,104,106,108,112,116,

%U 118,120,122,124,134,136,142,144,146,148,150,152,158,160,162,164,166,172

%N Numbers n such that 1 = abs(sum{p-1|p is prime and divisor of n} - product{p-1|p is prime and divisor of n}).

%H Robert Israel, <a href="/A174164/b174164.txt">Table of n, a(n) for n = 1..10000</a>

%e 6 is a term because 6=2*3 and 1=abs((2-1)+(3-1)-(2-1)*(3-1)).

%e 10 is a term because 10=2*5 and 1=abs((2-1)+(5-1)-(2-1)*(5-1)).

%p From _R. J. Mathar_, Apr 26 2010: (Start)

%p A055631 := proc(n) add(d-1, d= numtheory[factorset](n) ) ; end proc:

%p A173557 := proc(n) mul(d-1, d= numtheory[factorset](n) ) ; end proc:

%p isA174164 := proc(n) A055631(n)-A173557(n) ; abs(%) = 1 ; end proc:

%p for n from 2 to 200 do if isA174164(n) then printf("%d,",n) ; end if; end do: (End)

%t filterQ[n_] := With[{pp = FactorInteger[n][[All, 1]]}, 1 == Abs[Total[pp-1] - Times @@ (pp-1)]];

%t Select[Range[200], filterQ] (* _Jean-François Alcover_, Sep 17 2020 *)

%Y Cf. A055631, A173557.

%Y Union of A100367 and A143207.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Mar 10 2010

%E Corrected (53 replaced by 52, 90 and 120 inserted) by _R. J. Mathar_, Apr 26 2010