OFFSET
1,1
COMMENTS
For primes this means 0 < 2 < p-1 so primes p greater than 3 are members.
Only two composite solutions below 10000000: n = 9 and n = 16.
From Charles R Greathouse IV, Apr 12 2010: (Start)
d(n) < phi(n) is true for all n > 30 (see A020490), so the main condition is n + 1 - d(n) - phi(n) < d(n). Rewrite this as n - phi(n) < 2d(n) - 1.
If n is composite, then the cototient n - phi(n) >= sqrt(n).
For n > 32760, d(n) < sqrt(n)/2.
So all composite solutions are in 1..32760. Checking these (and applying the other inequality), the only composite members are 9 and 16.
Thus the sequence is the primes greater than 3, together with 9 and 16.
(End)
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
n = 9 is a member: 3 divisors, 6 coprimes, 1 (it is 6) unrelated: 6 > 3 > 1;
n = 16 is a member: 5 divisors, 8 coprimes 4 unrelateds ({6, 10, 12, 14}): 8 > 5 > 4.
MATHEMATICA
Do[r=EulerPhi[n]; d=DivisorSigma[0, n]; u=n-r-d+1; If[Greater[r, d]&&Greater[d, u]&&!PrimeQ[n], Print[n, {d, r, u}]], {n, 1, 1000}] (* for composite solutions *) (* corrected by Charles R Greathouse IV, Apr 12 2010 *)
(* Second program: *)
Select[Range@ 272, Function[n, n - (#1 + #2 - 1) < #1 < #2 & @@ {DivisorSigma[0, n], EulerPhi[n]}]] (* Michael De Vlieger, Jul 22 2017 *)
PROG
(PARI) a(n) = if(n>6, prime(n), [5, 7, 9, 11, 13, 16][n]) \\ Charles R Greathouse IV, Apr 12 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, May 07 2003
EXTENSIONS
Extension, new definition, and edits from Charles R Greathouse IV, Apr 12 2010
STATUS
approved