The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A172502 Denominator of fraction whose decimal representation has form 0.(n)(n)(n)...with repeating part n. 4
9, 9, 3, 9, 9, 3, 9, 9, 1, 99, 9, 33, 99, 99, 33, 99, 99, 11, 99, 99, 33, 9, 99, 33, 99, 99, 11, 99, 99, 33, 99, 99, 3, 99, 99, 11, 99, 99, 33, 99, 99, 33, 99, 9, 11, 99, 99, 33, 99, 99, 33, 99, 99, 11, 9, 99, 33, 99, 99, 33, 99, 99, 11, 99, 99, 3, 99, 99, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is a divisor of 10^(floor(1+log_10(n)))-1. - Robert G. Wilson v, Jul 04 2015
LINKS
FORMULA
a(n) = denominator of n/(10^floor(1+log_10(n))-1) in reduced terms. - Robert G. Wilson v, Jul 05 2015
EXAMPLE
a(10) = 99; 10 / 99 = 0.10101010... (repeating 10). a(9) = 1; 1 / 1 = 0.9999999...
MAPLE
a:= n-> denom(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}, Denominator[n/(10^lg - 1)]]; Array[f, 70] (* Robert G. Wilson v, Jul 04 2015 *)
PROG
(Python)
from sympy import sympify
def A172502(n): return sympify('0.['+str(n)+']').q # Chai Wah Wu, Nov 12 2021
(PARI) a(n) = my(qd = #digits(n)); denominator(n / (10^(qd)-1)); \\ Michel Marcus, Jul 29 2023
CROSSREFS
Numerators are in A172500.
Sequence in context: A007471 A180012 A172504 * A118739 A192031 A283749
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Feb 05 2010
EXTENSIONS
Edited by Franklin T. Adams-Watters, Mar 28 2014
More terms from Alois P. Heinz, Jul 04 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 14:48 EDT 2024. Contains 373331 sequences. (Running on oeis4.)