OFFSET
1,1
COMMENTS
Values of k for the listed terms are 2, 2, 2, 2, 2, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, ...
If d_(x-i) were the aliquot parts of (x-i) and d_(x+i) the divisors of (x+i) we would get the average of twin prime pairs (A014574).
If d_(x-i) were the divisors of (x-i) and d_(x+i) the aliquot parts of (x+i) we would get 5, 6, 7, 1296, 3228, 32767, 65784, 128766, 711236, ...
EXAMPLE
For 7 the value of k is 2. Aliquot parts of 5, 6, 8 and 9 are: [1], [1, 2, 3], [1, 2, 4], [1, 3]. Residues are 0 + 0 + 1 + 1 + 0 + 1 + 3 + 0 + 1 that sum up to 7.
MAPLE
with(numtheory): P:=proc(q) local a, b, c, j, k, n;
for n from 3 to q do a:=0; k:=0; while a<n do k:=k+1;
b:=sort([op(divisors(n+k))]); c:=sort([op(divisors(n-k))]);
a:=a+add(n mod b[j], j=1..nops(b)-1)+add(n mod c[j], j=1..nops(c)-1); od;
if a=n then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Aug 02 2017
EXTENSIONS
a(27)-a(35) from Giovanni Resta, Aug 03 2017
STATUS
approved