login
A078267
Smallest k such that k*N is an integer where N is obtained by placing the string "n" after a decimal point.
6
10, 5, 10, 5, 2, 5, 10, 5, 10, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 4, 50, 100, 25, 100, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 20, 50, 100, 25, 100, 2, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 20
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
FORMULA
a(10^m) = 10, a(r*10^m) = a(r).
a(n) = (A078268(n)*10^A055642(n)) / n. [Jaroslav Krizek, Feb 05 2010]
a(n) = 10^A055642(n)/gcd(n, 10^A055642(n)). - Michael S. Branicky, Oct 05 2021
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
Sequence in context: A152611 A241146 A296420 * A083950 A045617 A158486
KEYWORD
base,frac,nonn
AUTHOR
Amarnath Murthy, Nov 24 2002
EXTENSIONS
Edited and extended by Henry Bottomley, Dec 08 2002
STATUS
approved