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.
%I A333442 #15 Feb 07 2022 21:46:29 %S A333442 0,1,1,2,1,2,4,3,1,1,2,2,4,6,2,2,9,2,10,2,6,3,12,4,2,3,3,8,15,2,15,5, %T A333442 2,3,3,3,3,9,4,3,5,6,10,4,2,6,8,4,22,2,3,3,7,3,3,4,9,9,4,3,5,6,4,4,5, %U A333442 3,4,13,5,5,35,4,5,4,3,8,4,4,6,4,9,5,8,4 %N A333442 For any n > 0, let Sum_{k >= 0} d_k / 10^k be the decimal representation of 1/n; a(n) is the least m such that d_m = max_{k >= 0} d_k. %C A333442 In other words, a(n) is the position of the first occurrence of the largest digit in the decimal representation of 1/n (A333236). %H A333442 Rémy Sigrist, <a href="/A333442/b333442.txt">Table of n, a(n) for n = 1..10000</a> %H A333442 Rémy Sigrist, <a href="/A333442/a333442.gp.txt">PARI program for A333442</a> %H A333442 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a> %F A333442 a(10*n) = a(n) + 1. %e A333442 The first terms, alongside 1/n with the first occurrence of A333236(n) in parentheses, are: %e A333442 n a(n) 1/n %e A333442 -- ---- --------------- %e A333442 1 0 (1) %e A333442 2 1 0.(5) %e A333442 3 1 0.(3)33333... %e A333442 4 2 0.2(5) %e A333442 5 1 0.(2) %e A333442 6 2 0.1(6)6666... %e A333442 7 4 0.142(8)57... %e A333442 8 3 0.12(5) %e A333442 9 1 0.(1)11111... %e A333442 10 1 0.(1) %o A333442 (PARI) See Links section. %o A333442 (Python) %o A333442 from sympy import n_order, multiplicity %o A333442 def A333442(n): %o A333442 if n == 1: return 0 %o A333442 m2, m5 = multiplicity(2,n), multiplicity(5,n) %o A333442 r = max(m2,m5)+n_order(10,n//2**m2//5**m5) %o A333442 s = str(10**r//n).zfill(r) %o A333442 return s.index(max(s))+1 # _Chai Wah Wu_, Feb 07 2022 %Y A333442 Cf. A333236. %K A333442 nonn,base %O A333442 1,4 %A A333442 _Rémy Sigrist_, Mar 21 2020