OFFSET
1,1
COMMENTS
Values of k for the listed terms are 3, 4, 1, 2, 3, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2.
EXAMPLE
For 5 the value of k is 3. Aliquot parts of 6, 7 and 8 are: [1, 2, 3], [1], [1, 2, 4]. Residues are 0 + 1 + 2 + 0 + 0 + 1 + 1 that sum up to 5.
MAPLE
with(numtheory): P:=proc(q) local a, b, 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))]);
a:=a+add(n mod b[j], j=1..nops(b)-1); od;
if a=n then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Paolo P. Lava, Aug 03 2017
EXTENSIONS
a(19)-a(22) from Giovanni Resta, Aug 04 2017
STATUS
approved