cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A071390 Least number m such that sigma(m) - phi(m) = n, or 0 if no such m exists.

Original entry on oeis.org

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

Views

Author

Labos Elemer, May 23 2002

Keywords

Comments

For n <> 2, a(n) < n^2/4. - Robert Israel, Apr 02 2020

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.).
		

Crossrefs

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

Formula

a(n) = Min{x; A000203(x)-A000010(x)=n} or a(n)=0 if no solution exists.
Showing 1-1 of 1 results.