login
A172500
Numerator of fraction whose decimal representation has form 0.(n)(n)(n)...with repeating part n.
4
1, 2, 1, 4, 5, 2, 7, 8, 1, 10, 1, 4, 13, 14, 5, 16, 17, 2, 19, 20, 7, 2, 23, 8, 25, 26, 3, 28, 29, 10, 31, 32, 1, 34, 35, 4, 37, 38, 13, 40, 41, 14, 43, 4, 5, 46, 47, 16, 49, 50, 17, 52, 53, 6, 5, 56, 19, 58, 59, 20, 61, 62, 7, 64, 65, 2, 67, 68, 23, 70, 71, 8, 73, 74, 25
OFFSET
1,2
COMMENTS
a(n) is a divisor of n. - Robert G. Wilson v, Jul 04 2015
LINKS
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
Denominators in A172502.
Sequence in context: A343250 A065518 A072012 * A330355 A329424 A038502
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