OFFSET
2,1
COMMENTS
See A051953 for x-phi(x), the cototient function. Note that a(n)=0 for n in A005278. Also note that n=1 has an infinite number of solutions. If n is prime, then a(n)=n^2. If n is even, then a(n)<=2n. In particular, if n=p+1 for a prime p, then a(n)=2n-2. Also, if n=2^k, then a(n)=2n. If n>9 is odd and composite, then a(n)=pq, with p>q odd primes with p+q=n+1 and p-q minimal. We can take p=A078496((n+1)/2) and q=A078587((n+1)/2).
LINKS
T. D. Noe, Table of n, a(n) for n=2..1000
FORMULA
a(n)=Max{x : A051953(x)=n} if the inverse set is not empty; a(n)=0 if no inverse exists.
EXAMPLE
For n=15, the solutions are x=39 and x=55, so a(15)=55. Note that 55=5*11 and 5+11=n+1.
MATHEMATICA
nn=10^4; lim=Floor[Sqrt[nn]]; mx=Table[0, {lim}]; Do[c=n-EulerPhi[n]; If[0<c<=lim, mx[[c]]=n], {n, nn}]; Rest[mx] (* T. D. Noe *)
Table[Module[{k = n^2}, While[And[k - EulerPhi@ k != n, k > 0], k--];
k], {n, 2, 62}] (* Michael De Vlieger, Mar 17 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 13 2001
EXTENSIONS
Corrected and edited by T. D. Noe, Oct 30 2006
STATUS
approved