OFFSET
0,2
COMMENTS
a(n) is the length signature of a string plus its length.
FORMULA
a(n) = ceiling(log_10(a(n) + 1)) + n.
Find k such that 10^k - (k + 1) <= n < 10^(k+1) - (k + 2), then a(n) = n + k + 1.
MATHEMATICA
With[{upto=100}, Complement[Range[0, upto], 10^Range[0, Floor[Log10[ upto]]]]] (* Harvey P. Dale, Nov 01 2016 *)
PROG
(Python)
def A057717(n): return n+(m:=len(str(n-1)))+(n>=10**m-m) if n else 0 # Chai Wah Wu, Jun 30 2024
(Python)
from itertools import count, islice
def agen(): # generator of terms
yield 0
yield from (j for i in count(0) for j in range(10**i+1, 10**(i+1)))
print(list(islice(agen(), 70))) # Michael S. Branicky, Oct 11 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
John Lindgren (john.lindgren(AT)Eng.Sun.COM), Oct 24 2000
EXTENSIONS
Better description from Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 29 2001
STATUS
approved