OFFSET
1,6
COMMENTS
a(n) is the least k >= 0 such that -n + k and (n-sigma(n))+k are coprime.
LINKS
FORMULA
EXAMPLE
For n=15, gcd(15-0, 15-(24-0)) = 3, gcd(15-1, 15-(24-1)) = 2 and gcd(15-2, 15-(24-2)) = 1, thus a(15) = 2.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2019
STATUS
approved