OFFSET
0,1
COMMENTS
Starting from n, search for a smallest number k such that k - d(k) = n, and if found such a number, replace n with k and repeat the procedure. When eventually such k is no longer found, then (new) n must be one of the terms of A045765. The number of times the procedure can be repeated before that happens is the value of a(n). Sequence A266116 gives the stopping value of n.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..124340
EXAMPLE
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 21 2015
STATUS
approved