OFFSET
1,2
EXAMPLE
Function selects the middle digit in n or, for even numbers, the digit to the left of the middle.
a(1) = 1;
a(12) = 1;
a(123) = 2;
a(1234) = 2.
MATHEMATICA
f[n_] := IntegerDigits[n] [[Floor[ (Log[10, n] + 2)/2]]]; Array[f, 105] (* Robert G. Wilson v, Jul 25 2010 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Dominick Cancilla, Jul 21 2010
EXTENSIONS
More terms from Robert G. Wilson v, Jul 25 2010
STATUS
approved