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.
%I A071390 #17 Apr 02 2020 11:42:35 %S A071390 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, %T A071390 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, %U A071390 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 %N A071390 Least number m such that sigma(m) - phi(m) = n, or 0 if no such m exists. %C A071390 For n <> 2, a(n) < n^2/4. - _Robert Israel_, Apr 02 2020 %H A071390 Robert Israel, <a href="/A071390/b071390.txt">Table of n, a(n) for n = 1..2000</a> %F A071390 a(n) = Min{x; A000203(x)-A000010(x)=n} or a(n)=0 if no solution exists. %e A071390 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.). %p A071390 N:= 100: # for a(1)..a(N) %p A071390 V:= Vector(N): %p A071390 for m from 2 to N^2/4 do %p A071390 v:= numtheory:-sigma(m)-numtheory:-phi(m); %p A071390 if v <= N and V[v]=0 then V[v]:= m fi %p A071390 od: %p A071390 convert(V,list); # _Robert Israel_, Apr 02 2020 %t A071390 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 %Y A071390 Cf. A000010, A000203, A065387, A051612, A071391. %K A071390 nonn %O A071390 1,2 %A A071390 _Labos Elemer_, May 23 2002