cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A333236 Largest digit in the decimal expansion of 1/n.

This page as a plain text file.
%I A333236 #32 Feb 07 2022 21:46:09
%S A333236 1,5,3,5,2,6,8,5,1,1,9,8,9,8,6,6,9,5,9,5,9,5,9,6,4,8,7,8,9,3,9,5,3,9,
%T A333236 8,7,7,9,6,5,9,9,9,7,2,9,9,8,9,2,9,9,9,8,8,8,9,9,9,6,9,9,8,6,8,5,9,9,
%U A333236 9,8,9,8,9,5,3,9,9,8,8,5,9,9,9,9,9,9,9,6,9,1,9,9,8,9,9,6,9,9,1,1,9,9,9,9,9
%N A333236 Largest digit in the decimal expansion of 1/n.
%H A333236 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>
%F A333236 a(n) = max_{i=0..n} (floor(10^i/n) mod 10).
%F A333236 a(10*n) = a(n) and a(n) = n iff n = 1, 3, 6. - _Bernard Schott_, Mar 19 2020
%e A333236 a(50) = 2 because the largest digit in 1/50 = 0.02 is 2.
%t A333236 a[n_] := Max@RealDigits[1/n][[1]]; Array[a, 88] (* _Giovanni Resta_, Mar 12 2020 *)
%o A333236 (Python)
%o A333236 from sympy import n_order, multiplicity
%o A333236 def A333236(n):
%o A333236     m2, m5 = multiplicity(2,n), multiplicity(5,n)
%o A333236     return int(max(str(10**(max(m2,m5)+n_order(10,n//2**m2//5**m5))//n))) # _Chai Wah Wu_, Feb 07 2022
%Y A333236 Cf. A333237 (a(n) = 9), A333402 (a(n) = 1).
%K A333236 nonn,base,easy
%O A333236 1,2
%A A333236 _Andrew Slattery_, Mar 12 2020
%E A333236 More terms from _Giovanni Resta_, Mar 12 2020