OFFSET
1,2
LINKS
FORMULA
a(n) = max_{i=0..n} (floor(10^i/n) mod 10).
a(10*n) = a(n) and a(n) = n iff n = 1, 3, 6. - Bernard Schott, Mar 19 2020
EXAMPLE
a(50) = 2 because the largest digit in 1/50 = 0.02 is 2.
MATHEMATICA
a[n_] := Max@RealDigits[1/n][[1]]; Array[a, 88] (* Giovanni Resta, Mar 12 2020 *)
PROG
(Python)
from sympy import n_order, multiplicity
def A333236(n):
m2, m5 = multiplicity(2, n), multiplicity(5, n)
return int(max(str(10**(max(m2, m5)+n_order(10, n//2**m2//5**m5))//n))) # Chai Wah Wu, Feb 07 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Andrew Slattery, Mar 12 2020
EXTENSIONS
More terms from Giovanni Resta, Mar 12 2020
STATUS
approved