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.

Showing 1-10 of 12 results. Next

A333237 Numbers k such that 1/k contains at least one '9' in its decimal expansion.

Original entry on oeis.org

11, 13, 17, 19, 21, 23, 29, 31, 34, 38, 41, 42, 43, 46, 47, 49, 51, 52, 53, 57, 58, 59, 61, 62, 67, 68, 69, 71, 73, 76, 77, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 94, 95, 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 118
Offset: 1

Views

Author

Andrew Slattery, Mar 12 2020

Keywords

Comments

Almost every prime appears in this sequence.
Among the first 10000 primes, only 2, 3, 5, 7, 37, 79, 239, 4649, and 62003 do not appear in the sequence. - Giovanni Resta, Mar 13 2020
The next primes not in the sequence are 538987, 35121409, and 265371653. - Robert Israel, Mar 18 2020

Examples

			5 is not in the sequence because 1/5 = 0.2 does not contain any 9s.
		

Crossrefs

Cf. A333236.
Subsequences (for terms > 1): A000533, A002275, A135577, A252491.
Cf. A216664 (a subsequence).
Cf. A187614.

Programs

  • Maple
    f:= proc(n) local m,S,r;
       m:= 1; S:= {1};
       do
         r:= floor(m/n);
         if r = 9 then return true fi;
         m:= (m - r*n)*10;
         if member(m,S) then return false fi;
         S:= S union {m};
       od
    end proc:
    select(f, [$1..1000]); # Robert Israel, Mar 18 2020
  • Mathematica
    Select[Range[120], MemberQ[ Flatten@ RealDigits[1/#][[1]], 9] &] (* Giovanni Resta, Mar 12 2020 *)
  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def A333237_gen(startvalue=1): # generator of terms
        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)) == '9':
                yield m
    A333237_list = list(islice(A333237_gen(), 10)) # Chai Wah Wu, Feb 07 2022

Formula

A333236(a(n)) = 9.

Extensions

More terms from Giovanni Resta, Mar 12 2020

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

Original entry on oeis.org

1, 9, 10, 90, 99, 100, 900, 909, 990, 999, 1000, 9000, 9009, 9090, 9900, 9990, 9999, 10000, 90000, 90009, 90090, 90900, 90909, 99000, 99900, 99990, 99999, 100000, 900000, 900009, 900090, 900900, 909000, 909090, 990000, 990099, 999000, 999900, 999990, 999999, 1000000
Offset: 1

Views

Author

Bernard Schott, Mar 19 2020

Keywords

Comments

If m is a term, 10*m is also a term.
If m is a term then m has only digits {1}, {9}, {1,0} or {9,0} in its decimal representation, but this is not sufficient to be a term (see examples).
Some subsequences below (not exhaustive, see crossrefs):
m = 10^k, k >= 0, hence m is in A011557 = {1, 10, 100, 1000, 10000, ...};
m = 9*10^k, k >= 0, hence m is in A052268 = {9, 90, 900, 9000, 90000, ...};
m = 10^k-1, k >= 1, hence m is in A002283 = {9, 99, 999, 9999, 99999, ...};
m = 9*(10^k+1), k >= 1, hence m is in 9*A000533 = {99, 909, 9009, 90009, ...};
m = 9+100*(100^k-1)/11, k >= 0, hence m is in 9*A094028 = {9, 909, 90909, 9090909, ...}.

Examples

			As 1/101 = 0.009900990099..., 101 is not a term.
As 1/909 = 0.001100110011..., 909 is a term.
As 1/9099 = 0.000109902187..., 9099 is not a term.
As 1/9999 = 0.000100010001..., 9999 is also a term.
		

Crossrefs

Cf. A333236, A333237 (similar, with 9).
Subsequences: A002283, A011557, A052268.
Subsequences: 9*A000533, 9*A094028, 9*A135577, 9*A261544, 9*A330135.

Programs

  • Mathematica
    Select[Range[10^4], Max @ RealDigits[1/#][[1]] == 1 &] (* Amiram Eldar, Mar 19 2020 *)
  • Python
    from itertools import count, islice
    def A333402_gen(startvalue=1): # generator of terms >= startvalue
        for m in count(max(startvalue,1)):
            k = 1
            while k <= m:
                k *= 10
            rset = {0}
            while True:
                k, r = divmod(k, m)
                if max(str(k)) > '1':
                    break
                else:
                    if r in rset:
                        yield m
                        break
                rset.add(r)
                k = r
                while k <= m:
                    k *= 10
    A333402_list = list(islice(A333402_gen(),30)) # Chai Wah Wu, Feb 17 2022

Formula

A333236(a(n))= 1.

Extensions

More terms from Jinyuan Wang, Mar 19 2020

A341383 Numbers m such that the largest digit in the decimal expansion of 1/m is 2.

Original entry on oeis.org

5, 45, 50, 450, 495, 500, 819, 825, 4500, 4545, 4950, 4995, 5000, 8190, 8250, 8325, 45000, 45045, 45450, 47619, 49500, 49950, 49995, 50000, 81819, 81900, 82500, 83250, 83325, 89109, 450000, 450045, 450450, 454500, 454545, 476190, 495000, 499500, 499950, 499995, 500000
Offset: 1

Views

Author

Bernard Schott, Feb 10 2021

Keywords

Comments

If m is a term, 10*m is also a term.
5 is the only prime up to 2.6*10^8 (comments in A333237).
Some subsequences: {45, 4545, 454545, ...}, {45045, 45045045, 45045045045, ...}, {45, 495, 4995, 49995, ...}, {819, 81819, 8181819, ...}, {825, 8325, 83325, 833325...}, ...
The subsequence of terms where 1/m has only digits {0,2} is m = 5*A333402 = 5, 45, 50, etc. A333402 is those t where 1/t has only digits {0,1}, so that 1/(5*t) = 2*(1/t)*(1/10) has digits {0,2}, starting from 1/5 = 0.2. These m are also A333402/2 of the even terms from A333402, since A333402 (like here) is self-similar in that the multiples of 10, divided by 10, are the sequence itself. - Kevin Ryde, Feb 13 2021

Examples

			As 1/45 = 0.0202020202..., 45 is a term.
As 1/825 = 0.0012121212121212...., 825 is a term.
As 1/47619 = 0.000021000021000021..., 47619 is a term.
As 1/4545045 = 0.000000220019824..., 4545045 is not a term.
		

Crossrefs

Cf. A333236.
Similar with largest digit k: A333402 (k=1), A333237 (k=9).
Subsequence: A093143 \ {1}.
Decimal expansion: A021499 (1/495), A021823 (1/819).

Programs

  • Mathematica
    Select[Range[10^5], Max[RealDigits[1/#][[1]]] == 2 &] (* Amiram Eldar, Feb 10 2021 *)
  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def A341383_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)) == '2':
                yield m
    A341383_list = list(islice(A341383_gen(),10)) # Chai Wah Wu, Feb 07 2022

Extensions

Missing terms added by Amiram Eldar, Feb 10 2021

A350814 Numbers m such that the largest digit in the decimal expansion of 1/m is 3.

Original entry on oeis.org

3, 30, 33, 75, 300, 303, 330, 333, 429, 750, 813, 3000, 3003, 3030, 3125, 3300, 3330, 3333, 4290, 4329, 7500, 7575, 8130, 30000, 30003, 30030, 30300, 30303, 31250, 33000, 33300, 33330, 33333, 42900, 43290, 46875, 75000, 75075, 75750, 76923, 81103, 81300, 300000
Offset: 1

Views

Author

Bernard Schott, Jan 30 2022

Keywords

Comments

If m is a term, 10*m is also a term.
3 is the only prime up to 2.6*10^8 (see comments in A333237).
Some subsequences:
{3, 30, 300, ...} = A093138 \ {1}.
{3, 33, 333, ...} = A002277 \ {0}.
{3, 33, 303, 3003, ...} = 3 * A000533.
{3, 303, 30303, 3030303, ...} = 3 * A094028.

Examples

			As 1/33 = 0.0303030303..., 33 is a term.
As 1/75 = 0.0133333333..., 75 is a term.
As 1/429 = 0.002331002331002331..., 429 is a term.
		

Crossrefs

Similar with largest digit k: A333402 (k=1), A341383 (k=2), A333237 (k=9).
Subsequences: A002277 \ {0}, A093138 \ {1}.
Decimal expansion: A010701 (1/3), A010674 (1/33).

Programs

  • Mathematica
    Select[Range[10^5], Max[RealDigits[1/#][[1]]] == 3 &] (* Amiram Eldar, Jan 30 2022 *)
  • Python
    from fractions import Fraction
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def repeating_decimals_expr(f, digits_only=False):
        """ returns repeating decimals of Fraction f as the string aaa.bbb[ccc].
            returns only digits if digits_only=True.
        """
        a, b = f.as_integer_ratio()
        m2, m5 = multiplicity(2,b), multiplicity(5,b)
        r = max(m2,m5)
        k, m = 10**r, 10**n_order(10,b//2**m2//5**m5)-1
        c = k*a//b
        s = str(c).zfill(r)
        if digits_only:
            return s+str(m*k*a//b-c*m)
        else:
            w = len(s)-r
            return s[:w]+'.'+s[w:]+'['+str(m*k*a//b-c*m)+']'
    def A350814_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda m:max(repeating_decimals_expr(Fraction(1,m),digits_only=True)) == '3',count(max(startvalue,1)))
    A350814_list = list(islice(A350814_gen(),10)) # Chai Wah Wu, Feb 07 2022

Extensions

More terms from Amiram Eldar, Jan 30 2022

A352153 Smallest digit in the decimal expansion of 1/n, ignoring leading and trailing 0's.

Original entry on oeis.org

1, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 3, 0, 1, 6, 2, 0, 5, 0, 5, 0, 4, 0, 1, 4, 1, 0, 1, 0, 3, 0, 1, 0, 0, 1, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Leading 0's are not considered, otherwise a(n) would be 0 when n >= 11 (see examples for 13 and 14).
Trailing 0's are not also considered, otherwise when 1/n is a terminating decimal (A003592), a(n) would be also 0.

Examples

			1/13 = 0.076923076923076923... with periodic part = '769230' (or '076923'), hence a(13) = 0.
1/14 = 0.0714285714285714285... with periodic part = '714285', hence a(14) = 1.
1/40 = 0.025 hence a(40) = 2.
		

Crossrefs

Cf. A003592, A333236 (largest digit).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Array[Min@ f@# &, 105]

Formula

a(n) = n iff n = 1 or n = 3.
a(10*n) = a(n).
a(10^n) = 1.

A351470 Numbers m such that the largest digit in the decimal expansion of 1/m is 4.

Original entry on oeis.org

25, 225, 250, 693, 2250, 2439, 2475, 2500, 3285, 4095, 4125, 6930, 6993, 22500, 22725, 23125, 23245, 24390, 24750, 24975, 25000, 30825, 32850, 40950, 41250, 41625, 42735, 69300, 69375, 69735, 69930, 71225, 225000, 225225, 227250, 231250, 232450, 238095, 243309, 243900, 247500, 249750
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term.
First few primitive terms are 25, 225, 693, 2439, 2475, 3285, 4095, 4125, ...
There is no prime up to 2.6*10^8 (see comments in A333237).

Examples

			As 1/25 = 0.04, and 25 is the smallest number m such that the largest digit in the decimal expansion of 1/m is 4, so a(1) = 25.
As 1/693 = 0.001443001443001443..., so 693 is a term.
		

Crossrefs

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

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]];Select[Range@1500000, Max@ f@# == 4 &]
  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def A351470_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)) == '4':
                yield m
    A351470_list = list(islice(A351470_gen(), 10)) # Chai Wah Wu, Feb 14 2022

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

A351472 Numbers m such that the largest digit in the decimal expansion of 1/m is 6.

Original entry on oeis.org

6, 15, 16, 24, 39, 60, 64, 88, 96, 150, 156, 160, 165, 219, 240, 246, 273, 275, 375, 378, 384, 390, 399, 462, 600, 606, 615, 624, 625, 640, 792, 822, 858, 880, 888, 956, 960, 975, 984, 1500, 1515, 1536, 1554, 1560, 1584, 1596, 1600, 1606, 1626, 1628, 1638, 1650, 1665, 1776, 2145
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term.
First few primitive terms are 6, 15, 16, 24, 39, 64, 88, 96, 156, 165, ...
There is no prime up to 2.6*10^8 (see comments in A333237).
Subsequence: {6, 606, 60606, ...} = 6 * A094028.

Examples

			1/6 = 0.166666..., and 6 is the smallest number m such that the largest digit in the decimal expansion of 1/m is 6, so a(1) = 6.
As 1/39 = 0.025641025641..., 39 is a term.
		

Crossrefs

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

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[Range@1500000, Max@ f@# == 6 &]
  • Python
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def A351472_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)) == '6':
                yield m
    A351472_list = list(islice(A351472_gen(), 20)) # Chai Wah Wu, Feb 17 2022

A351474 Numbers m such that the largest digit in the decimal expansion of 1/m is 8.

Original entry on oeis.org

7, 12, 14, 26, 28, 35, 48, 54, 55, 56, 63, 65, 70, 72, 78, 79, 93, 117, 120, 123, 125, 128, 140, 175, 176, 186, 192, 195, 205, 224, 239, 259, 260, 264, 280, 296, 312, 318, 328, 350, 372, 416, 432, 438, 448, 465, 480, 540, 542, 546, 548, 550, 555, 560, 572, 584, 594, 630, 632, 650, 675
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term. First few primitive terms are 7, 12, 14, 26, 28, 35, 48, 54, 55, 56, 63, 65, 72, ...
The seven primes up to 2.7*10^8 are 7, 79, 239, 62003, 538987, 35121409, 265371653 (see comments in A333237, example section and Crossrefs).

Examples

			As 1/7 = 0.142857142857142857..., 7 is a term.
As 1/26 = 0.0384615384615384615..., 26 is another term.
		

Crossrefs

Similar with largest digit k: A333402 (k=1), A341383 (k=2), A350814 (k=3), A351470 (k=4), A351471 (k=5), A351472 (k=6), A351473 (k=7), this sequence (k=8), A333237 (k=9).
Cf. A333236.
Decimal expansion of: A020806 (1/7), A021058 (1/54), A021060 (1/56), A021067 (1/63), A021069 (1/65), A021083 (1/79), A021097 (1/93).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[Range@1500000, Max@ f@# == 8 &]
  • PARI
    isok(m) = my(m2=valuation(m, 2), m5=valuation(m, 5)); vecmax(digits(floor(10^(max(m2,m5) + znorder(Mod(10, m/2^m2/5^m5))+1)/m))) == 8; \\ Michel Marcus, Feb 26 2022
    
  • Python
    from itertools import count, islice
    from sympy import multiplicity, n_order
    def A351474_gen(startvalue=1): # generator of terms >= startvalue
        for a in count(max(startvalue,1)):
            m2, m5 = (~a&a-1).bit_length(), multiplicity(5,a)
            k, m = 10**max(m2,m5), 10**n_order(10,a//(1<A351474_list = list(islice(A351474_gen(),20)) # Chai Wah Wu, May 02 2023

Formula

A333236(a(n)) = 8.

A351473 Numbers m such that the largest digit in the decimal expansion of 1/m is 7.

Original entry on oeis.org

27, 36, 37, 44, 132, 135, 148, 234, 270, 288, 292, 297, 308, 315, 360, 364, 369, 370, 404, 407, 440, 468, 576, 616, 636, 657, 707, 728, 756, 808, 864, 1287, 1295, 1313, 1314, 1320, 1332, 1350, 1365, 1375, 1386, 1404, 1408, 1476, 1480, 1485, 1507, 1512, 1752, 1804, 1896
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term.
First few primitive terms are 27, 36, 37, 44, 132, 135, 148, 234, 288, ...
The unique prime up to 2.6*10^8 is 37 (see comments in A333237 and example).
Subsequence: {132, 1332, 13332, ...} = A073551 \ {2, 12}.

Examples

			As 1/37 = 0.027027027..., 37 is a term.
As 1/148 = 0.00675675675675..., 148 is a term.
		

Crossrefs

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

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[Range@1500000, Max@ f@# == 7 &]
  • Python
    from itertools import count, islice
    from sympy import multiplicity, n_order
    def A351473_gen(startvalue=1): # generator of terms >= startvalue
        for a in count(max(startvalue,1)):
            m2, m5 = (~a&a-1).bit_length(), multiplicity(5,a)
            k, m = 10**max(m2,m5), 10**n_order(10,a//(1<A351473_list = list(islice(A351473_gen(),20)) # Chai Wah Wu, May 02 2023
Showing 1-10 of 12 results. Next