|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
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)):
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|