OFFSET
0,3
COMMENTS
Lexicographically smallest nondecreasing left inverse to A117804: a(A117804(n)) = n. Gives the number to which belongs the digit A007376(n). - M. F. Hasler, Oct 23 2019
PROG
(Python)
from oeis_sequences.OEISsequences import bisection, bsearch
def A100470(n):
def g(x): return x+(m:=len(str(x)))*(x+1)-10*(10**(m-1)-1)//9
def f(x): return n+1+bsearch(g, x)
return bisection(f, n+1, n+1)-n-(not n) # Chai Wah Wu, Mar 02 2026
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Rick L. Shepherd, Nov 21 2004
STATUS
approved
