OFFSET
1,1
COMMENTS
MATHEMATICA
(*A063990 Amicable numbers.*);
s[n_] := DivisorSigma[1, n] - n;
AmicableNumberQ[n_] := If[Nest[s, n, 2] == n && ! s[n] == n, True, False];
a = Select[Range[10^6], AmicableNumberQ[ # ] &];
Table[a[[n + 1]] - a[[n]], {n, 1, Length[a], 2}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, May 29 2010
EXTENSIONS
Formula clarified by the Assoc. Eds. of the OEIS - Jun 07 2010
STATUS
approved