OFFSET
1,1
COMMENTS
The numbers and the program were provided by Charles R Greathouse IV.
If n belongs to the sequence, then sigma(n) = d*n + rem, so sigma(n)/n = d + rem/n. Since rem is a divisor of n, n = rem*r, thus rem/n = 1/r. Then sigma(n)/n = d + 1/r and contfrac(sigma(n)/n) = [d, r], and length(contfrac(sigma(n)/n)) = 2. That is, A071862(n) = 2. - Michel Marcus, Aug 29 2012
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..1000
EXAMPLE
24 has the divisors 1,2,3,4,6,12,24, which sum to be 60. Divide 60 by 24 and the remainder is 12, which is a divisor of 24.
MATHEMATICA
a={}; For[n=1, n<=5000, n++, If[!PrimeQ[n], {s=DivisorSigma[1, n]; If[Mod[n, Mod[s, n]] == 0, AppendTo[a, n]]; }]; ]; a (* John W. Layman, Jul 31 2012 *)
Select[Range[5000], CompositeQ[#]&&Mod[#, Mod[DivisorSigma[1, #], #]]==0&] // Quiet (* Harvey P. Dale, May 24 2019 *)
PROG
(PARI) is(n)=my(t=sigma(n)%n); t && n%t==0 && !isprime(n)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, Jul 31 2012
EXTENSIONS
Terms a(24)-a(41) from John W. Layman, Jul 31 2012
STATUS
approved