A064435 Duplicate of A020488.
1, 3, 8, 10, 18, 24, 30
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Select[Range[150],2*DivisorSigma[0,#]==EulerPhi[#]&] (* Harvey P. Dale, Jun 28 2022 *)
for(n=1,1000000, if(numdiv(n)*2==eulerphi(n),print(n),))
Select[Range[300],3DivisorSigma[0,#]==EulerPhi[#]&] (* Harvey P. Dale, Sep 15 2016 *)
for(n=1,10^7, if(3*numdiv(n)==eulerphi(n),print(n)))
for(n=1,10^6, if(numdiv(n)*4==eulerphi(n),print(n)))
Table[EulerPhi[n] - DivisorSigma[0, n], {n, 100}] (* Wesley Ivan Hurt, Nov 24 2021 *)
j=[]; for(n=1,150,j=concat(j,eulerphi(n)-(numdiv(n)))); j
{ for (n=1, 1000, write("b063070.txt", n, " ", eulerphi(n) - numdiv(n)) ) } \\ Harry J. Smith, Aug 16 2009
30 is not in the sequence because d(30) + phi(30) - 1 = 8 + 8 - 1 = 15. There are as many divisors and coprimes as there are numbers j <= 30 that neither divide nor are coprime to 30. 50 is not here because d(50) + phi(50) - 1 = 6 + 20 - 1 = 25. There are as many divisors and coprimes as there are numbers j < 50 that neither divide nor are coprime to 50. 146 is here because d(146) + phi(146) - 1 = 4 + 72 - 1 = 75; 146/2 = 73, and 75 > 73. 61455 is here because d(61455) + phi(61455) - 1 = 16 + 30720 - 1 = 30735; 61455/2 = 30727 + 1/2, and 30735 > 61455/2.
Do[r=EulerPhi[n]; d=DivisorSigma[0, n]; u=n-r-d+1; If[Greater[n-u, n/2], Print[n, {d, r, u}]], {n, 1, 100}] (* Second program: *) Select[Range[120], DivisorSigma[0, #] + EulerPhi[#] - 1 > #/2 &] (* Michael De Vlieger, Aug 22 2023 *)
a(1) = A020488(A112954(1)) = A020488(7) = 30; a(2) = A062516(A112954(2)) = A062516(9) = 120; a(3) = A063469(A112954(3)) = A063469(10) = 210; a(4) = A063470(A112954(4)) = A063470(9) = 420.
Table[SelectFirst[Range[10^5], EulerPhi@ # == n DivisorSigma[0, #] &] /. k_ /; MissingQ@ k -> 0, {n, 120}] (* Michael De Vlieger, Aug 09 2017, Version 10.2 *)
k = 42 is a term because d = 8 divisors, r = 12 coprimes and u = 23 unrelated belong to it: u = 23 > 19 = 8 + 12 - 1 = d + r - 1.
filter:= n -> n > 2*(numtheory:-tau(n) + numtheory:-phi(n)-1): select(filter, [$1..1000]); # Robert Israel, May 15 2017
Do[r=EulerPhi[n]; d=DivisorSigma[0, n]; u=n-d-r+1; If[Greater[u, n/2], Print[n, {d, r, u}]], {n, 1, 100}] (* Second program: *) Select[Range@ 256, # - (DivisorSigma[0, #] + EulerPhi[#] - 1) > #/2 &] (* Michael De Vlieger, Jul 22 2017 *)
Comments