OFFSET
1,2
COMMENTS
a(n) is a divisor of n. - Robert G. Wilson v, Jul 04 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = numerator of n/(10^floor(1+log_10(n))-1) in reduced terms. - Robert G. Wilson v, Jul 05 2015
EXAMPLE
a(10) = 10; 10 / 99 = 0.10101010... (repeating 10). a(9) = 1; 1 / 1 = 0.9999999...
MAPLE
a:= n-> numer(n*sum(10^(-i*length(n)), i=1..infinity)):
seq(a(n), n=1..100); # Alois P. Heinz, Jul 04 2015
MATHEMATICA
f[n_] := Block[{lg = 1 + Floor@ Log10@ n}, Numerator[n/(10^lg - 1)]]; Array[f, 75] (* Robert G. Wilson v, Jul 04 2015 *)
PROG
(Python)
from sympy import sympify
def A172500(n): return sympify('0.['+str(n)+']').p # Chai Wah Wu, Nov 12 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Feb 05 2010
EXTENSIONS
Edited by Franklin T. Adams-Watters, Mar 28 2014
More terms from Robert G. Wilson v, Jul 04 2015
STATUS
approved