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.

A351471 Numbers m such that the largest digit in the decimal expansion of 1/m is 5.

Original entry on oeis.org

2, 4, 8, 18, 20, 22, 32, 40, 66, 74, 80, 180, 185, 198, 200, 220, 222, 320, 396, 400, 444, 492, 660, 666, 702, 704, 738, 740, 800, 803, 876, 1800, 1818, 1845, 1848, 1850, 1875, 1912, 1980, 1998, 2000, 2200, 2220, 2222, 2409, 2424, 2466, 2849, 3075, 3200, 3212, 3276, 3960, 3996, 4000
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term.
First few primitive terms are 2, 4, 8, 18, 22, 32, 66, 74, 185, 198, 222, 396, ...
2 and 4649 are the only primes up to 2.6*10^8 (see comments in A333237).
Some subsequences:
{2, 22, 222, 2222, ...} = A002276 \ {0}.
{66, 666, 6666, ...} = A002280 \ {0, 6}.
{18, 1818, 181818, ...} = 18 * A094028.

Examples

			As 1/8 = 0.125, 8 is a term.
As 1/4649 = 0.000215121512151..., 4649 is a term.
		

Crossrefs

Subsequences: A002276, A002280.
Similar with largest digit k: A333402 (k=1), A341383 (k=2), A350814 (k=3), A351470 (k=4), this sequence (k=5), A351472 (k=6), A351473 (k=7), A351474 (k=8), A333237 (k=9).
Cf. A333236.

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[Range@1500000, Max@ f@# == 5 &]
  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def A351471_gen(startvalue=1): # generator of terms >= startvalue
        for m in count(max(startvalue, 1)):
            m2, m5 = multiplicity(2, m), multiplicity(5, m)
            if max(str(10**(max(m2, m5)+n_order(10, m//2**m2//5**m5))//m)) == '5':
                yield m
    A351471_list = list(islice(A351471_gen(), 10)) # Chai Wah Wu, Feb 15 2022