OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Aliquot Divisor.
EXAMPLE
16 has the proper divisors 1,2,4 and 8. 17 has the proper divisor 1. The sum of those divisors is 16, therefore 16 is in the sequence.
MATHEMATICA
Select[Range[1000000], DivisorSigma[1, # ] + DivisorSigma[1, # + 1] - 2*# - 1 == # || DivisorSigma[1, # ] + DivisorSigma[1, # + 1] - 2*# - 1 == # + 1 &]
lst = {}; d1 = d2 = 1; Do[ d2 = DivisorSigma[1, n + 1]; d = d1 + d2 - 2 n - 1; If[d == n || d == n + 1, Print@n; AppendTo[lst, n]]; d1 = d2, {n, 2*10^9}]; lst (* Robert G. Wilson v, Jul 27 2007 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot, Jul 14 2007
EXTENSIONS
Edited, corrected and extended by Stefan Steinerberger, Jul 16 2007
a(29)-a(32) from Robert G. Wilson v, Jul 27 2007
STATUS
approved