OFFSET
1,1
COMMENTS
a(n) is the difference between the n-th and (n+1)-th amicable numbers when ordered by increasing value.
For 1 <= k <= 8, a(2k-1) is the difference between the larger and the smaller terms of the k-th amicable pair, and for 1 <= k <= 8, a(2k) is the difference between the smaller term of the (k+1)-th pair and the larger term of the k-th pair. Beginning with the 9th pair (63020,76084), the pairs ordered by their first element are no longer adjacent. - Bernard Schott, Mar 09 2019
FORMULA
EXAMPLE
a(2) = amicable(3) - amicable(2) = 1184 - 284 = 900.
From Bernard Schott, Mar 10 2019: (Start)
a(1) = 284 - 220 = 64 is the difference between the larger and the smaller terms of the first amicable pair.
a(4) = 2620 - 1210 = 1410 is the difference between the smaller term of the third amicable pair and the larger term of the second amicable pair. (End)
PROG
(MATLAB)
clear
clc
A = zeros(100000, 1);
parfor n = 1:1:100000
f = find(rem(n, 1:floor(sqrt(n))) == 0);
f = unique([1, n, f, fix(n./f)]);
A(n) = sum(f) - n;
end
D = [];
d = 1;
for a = 1:1:100000
for b = 1:1:100000
if A(a) == b && A(b) == a && a~=b
D(d) = a;
d = d+1;
end
end
end
D
difference = diff(D)
CROSSREFS
KEYWORD
nonn
AUTHOR
Conor Coons, Feb 28 2019
EXTENSIONS
More terms from Michel Marcus, Mar 09 2019
STATUS
approved