login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest digit of n minus the number of digits of n.
0

%I #32 Sep 18 2013 02:53:51

%S -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,

%T 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,

%U 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

%N Largest digit of n minus the number of digits of n.

%C The last positive term is a(10^8-1) = a(99999999) = 1.

%C The last nonnegative term is a(10^9-1) = a(999999999) = 0.

%C The number of negative terms is infinite.

%F a(n) = A054055(n) - A055642(n).

%e -------------------------------

%e . Largest Number

%e n digit of digits a(n)

%e -------------------------------

%e 9 9 1 8

%e 10 1 2 -1

%e 11 1 2 -1

%e 12 2 2 0

%e 13 3 2 1

%e ...

%Y Cf. A054055, A055642.

%K sign,base,easy

%O 0,4

%A _Omar E. Pol_, Sep 04 2013