login
A228822
Largest digit of n minus the number of digits of n.
0
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, -2
OFFSET
0,4
COMMENTS
The last positive term is a(10^8-1) = a(99999999) = 1.
The last nonnegative term is a(10^9-1) = a(999999999) = 0.
The number of negative terms is infinite.
FORMULA
a(n) = A054055(n) - A055642(n).
EXAMPLE
-------------------------------
. Largest Number
n digit of digits a(n)
-------------------------------
9 9 1 8
10 1 2 -1
11 1 2 -1
12 2 2 0
13 3 2 1
...
CROSSREFS
Sequence in context: A031076 A346732 A321999 * A255829 A277547 A190598
KEYWORD
sign,base,easy
AUTHOR
Omar E. Pol, Sep 04 2013
STATUS
approved