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 13 results. Next

A352154 Numbers m such that the decimal expansion of 1/m contains the digit 0, ignoring leading and trailing 0's.

Original entry on oeis.org

11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 34, 37, 38, 39, 41, 42, 43, 46, 47, 48, 49, 51, 52, 53, 57, 58, 59, 61, 62, 63, 67, 68, 69, 71, 73, 76, 77, 78, 79, 81, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114
Offset: 1

Views

Author

Keywords

Comments

Leading 0's are not considered, otherwise every integer >= 11 would be a term (see examples).
Trailing 0's are also not considered, otherwise numbers of the form 2^i*5^j with i, j >= 0, apart 1 (A003592) would be terms.
If k is a term, 10*k is also a term; so, terms with no trailing zeros are all primitive.
Some subsequences:
{11, 111, 1111, ...} = A002275 \ {0, 1}
{33, 333, 3333, ...} = A002277 \ {0, 3}.
{77, 777, 7777, ...} = A002281 \ {0, 7}
{11, 101, 1001, 10001, ...} = A000533 \ {1}.

Examples

			m = 13 is a term since 1/13 = 0.0769230769230769230... has a periodic part = '07692307' or '76923070' with a 0.
m = 14 is not a term since 1/14 = 0.0714285714285714285... has a periodic part = '714285' which has no 0 (the only 0 is a leading 0).
		

Crossrefs

Similar with smallest digit k: this sequence (k=0), A352155 (k=1), A352156 (k=2), A352157 (k=3), A352158 (k=4), A352159 (k=5), A352160 (k=6), A352153 (no known term for k=7), A352161 (k=8), no term (k=9).

Programs

  • Maple
    removeInitial0:= proc(L) local i;
      for i from 1 to nops(L) do if L[i] <> 0 then return L[i..-1] fi od;
      []
    end proc:
    filter:= proc(n) local q;
      q:= NumberTheory:-RepeatingDecimal(1/n);
      member(0, removeInitial0(NonRepeatingPart(q))) or member(0, RepeatingPart(q))
    end proc:
    select(filter, [$1..300]); # Robert Israel, Apr 26 2023
  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 200, Min@ f@# == 0 &]

Formula

A352153(a(n)) = 0.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Andrew Slattery, Mar 12 2020

Keywords

Examples

			a(50) = 2 because the largest digit in 1/50 = 0.02 is 2.
		

Crossrefs

Cf. A333237 (a(n) = 9), A333402 (a(n) = 1).

Programs

  • Mathematica
    a[n_] := Max@RealDigits[1/n][[1]]; Array[a, 88] (* Giovanni Resta, Mar 12 2020 *)
  • 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

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

Extensions

More terms from Giovanni Resta, Mar 12 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

A352155 Numbers m such that the smallest digit in the decimal expansion of 1/m is 1, ignoring leading and trailing 0's.

Original entry on oeis.org

1, 6, 7, 8, 9, 10, 14, 24, 26, 28, 32, 35, 54, 55, 56, 60, 64, 65, 66, 70, 72, 74, 75, 80, 82, 88, 90, 100, 104, 112, 128, 140, 175, 176, 224, 240, 260, 280, 320, 350, 432, 448, 468, 504, 512, 528, 540, 548, 550, 560, 572, 576, 584, 592, 600, 616, 625, 640, 650, 660
Offset: 1

Views

Author

Keywords

Comments

Leading 0's are not considered, otherwise every integer >= 11 would be a term (see examples).
Trailing 0's are also not considered, otherwise numbers of the form 2^i*5^j with i, j >= 0, apart from 1 (A003592) would be terms.
If k is a term, 10*k is also a term; so, terms with no trailing zeros are all primitive terms.
{8, 88, 888, ...} = A002282 \ {0} is a subsequence.

Examples

			m = 14 is a term since 1/14 = 0.0714285714285714285... and the smallest term after the leading 0 is 1.
m = 240 is a term since 1/240 = 0.00416666666... and the smallest term after the leading 0's is 1.
m = 888 is a term since 1/888 = 0.001126126126... and the smallest term after the leading 0's is 1.
		

Crossrefs

Similar with smallest digit k: A352154 (k=0), this sequence (k=1), A352156 (k=2), A352157 (k=3), A352158 (k=4), A352159 (k=5), A352160 (k=6), A352153 (no known term for k=7), A352161 (k=8), no term (k=9).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 1100, Min@ f@# == 1 &]
  • Python
    from itertools import count, islice
    from sympy import multiplicity, n_order
    def A352155_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            m2, m5 = multiplicity(2,n), multiplicity(5,n)
            k, m = 10**max(m2,m5), 10**(t := n_order(10,n//2**m2//5**m5))-1
            c = k//n
            s = str(m*k//n-c*m).zfill(t)
            if s == '0' and min(str(c)) == '1':
                yield n
            elif '0' not in s and min(str(c).lstrip('0')+s) == '1':
                    yield n
    A352155_list = list(islice(A352155_gen(),20)) # Chai Wah Wu, Mar 28 2022

Formula

A352153(a(n)) = 1.

A353437 Integers m such that the decimal expansion of 1/m contains the digit 1.

Original entry on oeis.org

1, 6, 7, 8, 9, 10, 14, 17, 19, 21, 23, 24, 26, 28, 29, 31, 32, 34, 35, 38, 39, 43, 46, 47, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Keywords

Comments

If m is a term, 10*m is also a term, so terms with no trailing zeros are all primitive terms.

Examples

			m = 7 is a term since 1/7 = 0.142857142857... (here, 1 is the smallest digit).
m = 17 is a term since 1/17 = 0.05882352941176470588235294117647...
m = 99 is a term since 1/99 = 0.0101010101... (here, 1 is the largest digit).
		

Crossrefs

A333402 (largest digit=1) and A352155 (smallest digit=1) are subsequences.
Similar with digit k: A352154 (k=0), this sequence (k=1), A353438 (k=2), A353439 (k=3), A353440 (k=4), A353441 (k=5), A353442 (k=6), A353443 (k=7), A353444 (k=8), A333237 (k=9).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 125, MemberQ[f@#, 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.
Showing 1-10 of 13 results. Next