OFFSET
1,2
COMMENTS
For n <> 2, a(n) < n^2/4. - Robert Israel, Apr 02 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
EXAMPLE
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.).
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 23 2002
STATUS
approved