OFFSET
1,1
COMMENTS
From Jaroslav Krizek, Feb 05 2010: (Start)
a(n) is the denominator of fraction a/b, where gcd(a, b) = 1, such that its decimal representation has form 0.(n).
The numerators are in A078268. Example: a(6) = 5; 3/5 = 0.6.
(End)
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(10^m) = 10, a(r*10^m) = a(r).
EXAMPLE
a(40) = 5 since 5*0.40 = 2 is an integer. a(1) = a(10) = 10.
MATHEMATICA
Array[#2/GCD[#1, #2] & @@ {#, 10^IntegerLength[#]} &, 65] (* Michael De Vlieger, Oct 05 2021 *)
PROG
(PARI) a(n) = denominator(n/10^(#Str(n))); \\ Michel Marcus, Mar 31 2019
(Python)
from math import gcd
def a(n): b = 10**len(str(n)); return b//gcd(n, b)
print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 05 2021
CROSSREFS
KEYWORD
base,frac,nonn
AUTHOR
Amarnath Murthy, Nov 24 2002
EXTENSIONS
Edited and extended by Henry Bottomley, Dec 08 2002
STATUS
approved