A174164 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}).
6, 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 68, 72, 74, 76, 80, 82, 86, 88, 90, 92, 94, 96, 98, 100, 104, 106, 108, 112, 116, 118, 120, 122, 124, 134, 136, 142, 144, 146, 148, 150, 152, 158, 160, 162, 164, 166, 172
Offset: 1
Keywords
Examples
6 is a term because 6=2*3 and 1=abs((2-1)+(3-1)-(2-1)*(3-1)). 10 is a term because 10=2*5 and 1=abs((2-1)+(5-1)-(2-1)*(5-1)).
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
From R. J. Mathar, Apr 26 2010: (Start) A055631 := proc(n) add(d-1, d= numtheory[factorset](n) ) ; end proc: A173557 := proc(n) mul(d-1, d= numtheory[factorset](n) ) ; end proc: isA174164 := proc(n) A055631(n)-A173557(n) ; abs(%) = 1 ; end proc: for n from 2 to 200 do if isA174164(n) then printf("%d,",n) ; end if; end do: (End)
-
Mathematica
filterQ[n_] := With[{pp = FactorInteger[n][[All, 1]]}, 1 == Abs[Total[pp-1] - Times @@ (pp-1)]]; Select[Range[200], filterQ] (* Jean-François Alcover, Sep 17 2020 *)
Extensions
Corrected (53 replaced by 52, 90 and 120 inserted) by R. J. Mathar, Apr 26 2010