A071390 Least number m such that sigma(m) - phi(m) = n, or 0 if no such m exists.
0, 2, 0, 0, 4, 0, 9, 0, 0, 6, 8, 0, 0, 10, 49, 15, 0, 14, 0, 21, 0, 27, 16, 12, 0, 22, 169, 33, 0, 26, 0, 39, 18, 20, 289, 65, 0, 34, 361, 51, 0, 38, 0, 28, 0, 0, 32, 95, 0, 46, 0, 24, 0, 45, 0, 115, 0, 0, 841, 161, 0, 58, 961, 30, 0, 62, 81, 63, 0, 0, 0, 155, 50, 40, 1369, 217, 0, 74
Offset: 1
Keywords
Examples
n=255: a(255) = 16129 = 127^2, sigma(16129) = 16257, phi(16129) = 16002, 16257 - 16002 = 255 = n. Squares of primes are often solutions (4, 9, 49, 169, 289, 361, etc.).
Links
- Robert Israel, Table of n, a(n) for n = 1..2000
Programs
-
Maple
N:= 100: # for a(1)..a(N) V:= Vector(N): for m from 2 to N^2/4 do v:= numtheory:-sigma(m)-numtheory:-phi(m); if v <= N and V[v]=0 then V[v]:= m fi od: convert(V,list); # Robert Israel, Apr 02 2020
-
Mathematica
f[x_] := DivisorSigma[1, x]-EulerPhi[x] t=Table[0, {100}]; Do[c=f[n]; If[c<101&&t[[c]]==0, t[[c]]=n], {n, 1, 1000}]; t
Comments