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.

Previous Showing 11-20 of 32 results. Next

A078244 Smallest multiple of n using only digits 0 and 5.

Original entry on oeis.org

5, 50, 555, 500, 5, 5550, 5005, 5000, 555555555, 50, 55, 55500, 5005, 50050, 555, 50000, 55505, 5555555550, 55005, 500, 50505, 550, 550505, 555000, 50, 50050, 5505555555, 500500, 5505505, 5550, 555055, 500000, 555555, 555050, 5005
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

a(n) = min{A169964(k): k > 1 and A169964(k) mod n = 0}. [Reinhard Zumkeller, Jan 10 2012]

Crossrefs

Programs

  • Haskell
    a078244 n = head [x | x <- tail a169964_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    Module[{mlts=Rest[FromDigits/@Tuples[{0,5},12]]},Table[ SelectFirst[ mlts,Divisible[ #,n]&],{n,40}]] (* Harvey P. Dale, Aug 14 2021 *)

Extensions

More terms from Ray Chandler, Jul 12 2004

A078245 Smallest multiple of n using only digits 0 and 6.

Original entry on oeis.org

6, 6, 6, 60, 60, 6, 6006, 600, 666, 60, 66, 60, 6006, 6006, 60, 6000, 66606, 666, 66006, 60, 6006, 66, 660606, 600, 600, 6006, 666666666, 60060, 6606606, 60, 666066, 60000, 66, 66606, 60060, 6660, 666, 66006, 6006, 600, 66666, 6006, 6606606, 660, 6660, 660606
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

a(n) = min{A204093(k): k > 0 and A204093(k) mod n = 0}. [Reinhard Zumkeller, Jan 10 2012]

Crossrefs

Programs

  • Haskell
    a078245 n = head [x | x <- tail a204093_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    With[{c=Rest[FromDigits/@Tuples[{0,6},10]]},Table[SelectFirst[c,Divisible[ #,n]&],{n,50}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Apr 15 2015 *)
  • Python
    def A204093(n): return int(bin(n)[2:].replace('1', '6'))
    def a(n):
        k = 1
        while A204093(k)%n: k += 1
        return A204093(k)
    print([a(n) for n in range(1, 47)]) # Michael S. Branicky, Jun 06 2021

Extensions

More terms from Ray Chandler, Jul 12 2004

A078246 Smallest multiple of n using only digits 0 and 7.

Original entry on oeis.org

7, 70, 777, 700, 70, 7770, 7, 7000, 777777777, 70, 77, 77700, 7007, 70, 7770, 70000, 77707, 7777777770, 77007, 700, 777, 770, 770707, 777000, 700, 70070, 7707777777, 700, 7707707, 7770, 777077, 700000, 777777, 777070, 70, 77777777700, 777, 770070
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

a(n) = min{A204094(k): k > 0 and A204094(k) mod n = 0}. [Reinhard Zumkeller, Jan 10 2012]

Crossrefs

Programs

  • Haskell
    a078246 n = head [x | x <- tail a204094_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    With[{c=Rest[FromDigits/@Tuples[{0,7},11]]},Table[SelectFirst[c, Divisible[ #,n]&],{n,40}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 27 2019 *)

Extensions

More terms from Ray Chandler, Jul 12 2004

A078247 Smallest multiple of n using only digits 0 and 8.

Original entry on oeis.org

8, 8, 888, 8, 80, 888, 8008, 8, 888888888, 80, 88, 888, 8008, 8008, 8880, 80, 88808, 888888888, 88008, 80, 80808, 88, 880808, 888, 800, 8008, 8808888888, 8008, 8808808, 8880, 888088, 800, 888888, 88808, 80080, 888888888, 888, 88008, 80808, 80, 88888, 80808
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

a(n) = min{A204095(k): k > 0 and A204095(k) mod n = 0}. [Reinhard Zumkeller, Jan 10 2012]

Crossrefs

Programs

  • Haskell
    a078247 n = head [x | x <- tail a204095_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    Module[{nn=10,lst},lst=Rest[FromDigits/@Tuples[{0,8},nn]];Table[SelectFirst[lst,Divisible[#,n]&],{n,50}]] (* Harvey P. Dale, Feb 20 2025 *)
  • Python
    def a(n):
        k = 1
        while  8*int(bin(k)[2:])%n: k += 1
        return 8*int(bin(k)[2:])
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, Aug 08 2021

Extensions

More terms from Ray Chandler, Jul 12 2004

A096682 Least k such that decimal representation of k*n contains only digits 0 and 3.

Original entry on oeis.org

3, 15, 1, 75, 6, 5, 429, 375, 37, 3, 3, 25, 231, 2145, 2, 1875, 1959, 185, 1737, 15, 143, 15, 14361, 125, 12, 1155, 12345679, 10725, 113907, 1, 10743, 9375, 1, 9795, 858, 925, 9, 8685, 77, 75, 813, 715, 76821, 75, 74, 71805, 639, 625, 67347, 6, 653, 5775, 5661
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Formula

a(n) = A078242(n)/n.

A096686 Least k such that decimal representation of k*n contains only digits 0 and 7.

Original entry on oeis.org

7, 35, 259, 175, 14, 1295, 1, 875, 86419753, 7, 7, 6475, 539, 5, 518, 4375, 4571, 432098765, 4053, 35, 37, 35, 33509, 32375, 28, 2695, 285473251, 25, 265783, 259, 25067, 21875, 23569, 22855, 2, 2160493825, 21, 20265, 1813, 175, 1897, 185, 179249
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n)  local q, q2, q5, n1, R, Agenda,d, newA, t, t1, t2;
    q2:= padic:-ordp(n,2);
    q5:= padic:-ordp(n,5);
    q:= max(q2,q5);
    n1:= n/2^q2/5^q5;
    R[7]:= 7: Agenda:= {7}:
    if 7 mod n1 = 0 then return 10^q*7/n fi;
    for d from 2 do
        newA:= NULL;
        for t in Agenda do
          t1:= 10*t mod n1;
          if not assigned(R[t1]) then
            R[t1]:= 10*R[t];
            newA:= newA, t1;
          fi;
          t2:= (10*t+7) mod n1;
          if t2 = 0 then
            return 10^q*(10*R[t]+7)/n;
            break
          elif not assigned(R[t2]) then
            R[t2]:= 10*R[t]+7;
            newA:= newA,t2;
          fi;
        od;
        Agenda:= [newA];
    od:
    end proc:
    map(f, [$1..50]); # Robert Israel, Mar 06 2017
  • Mathematica
    f07[n_]:=Module[{k=1},While[!SubsetQ[{0,7},IntegerDigits[n*k]],k++];k]; Array[f07,8] (* The program generates the first 8 terms of the sequence. To generate more, increase the Array constant but because some of the terms are quite large the program may take a long time to run. *) (* Harvey P. Dale, Sep 25 2024 *)

Formula

a(n) = A078246(n)/n.

A096687 Least k such that decimal representation of k*n contains only digits 0 and 8.

Original entry on oeis.org

8, 4, 296, 2, 16, 148, 1144, 1, 98765432, 8, 8, 74, 616, 572, 592, 5, 5224, 49382716, 4632, 4, 3848, 4, 38296, 37, 32, 308, 326255144, 286, 303752, 296, 28648, 25, 26936, 2612, 2288, 24691358, 24, 2316, 2072, 2, 2168, 1924, 204856, 2, 197530864, 19148
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Programs

  • Python
    def A096687(n):
        if n > 0:
            for i in range(1, 2**n):
                q, r = divmod(8*int(bin(i)[2:]), n)
                if not r:
                    return q
        return 1 # Chai Wah Wu, Jan 02 2015

Formula

a(n) = A078247(n)/n.

A216479 a(n) is the least multiple of n which uses only the digit 1, or a(n) = -1 if no such multiple exists.

Original entry on oeis.org

1, -1, 111, -1, -1, -1, 111111, -1, 111111111, -1, 11, -1, 111111, -1, -1, -1, 1111111111111111, -1, 111111111111111111, -1, 111111, -1, 1111111111111111111111, -1, -1, -1, 111111111111111111111111111, -1, 1111111111111111111111111111, -1, 111111111111111, -1, 111111, -1, -1, -1, 111, -1, 111111, -1, 11111, -1
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

a(n) = -1 if and only if n is a multiple of 2 or 5. See comment in A216485. - Chai Wah Wu, Jun 21 2015

Crossrefs

Cf. A084681 (number of 1's), A190301 (multiplier).

Programs

  • Mathematica
    Array[Which[GCD[#, 10] != 1, -1, Mod[#, 3] == 0, Block[{k = 1}, While[Mod[k, #] != 0, k = 10 k + 1]; k], True, (10^MultiplicativeOrder[10, #] - 1)/9] &, 42] (* Michael De Vlieger, Dec 11 2020 *)
  • Python
    def A216479(n):
        if n % 2 == 0 or n % 5 == 0:
            return -1
        rem = 1
        while rem % n != 0:
            rem = rem*10 + 1
        return rem
    # Azanul Haque, Nov 28 2020

A223474 Least positive multiple of n that when written in base 10 has digits in nonincreasing order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 60, 52, 42, 30, 32, 51, 54, 76, 20, 21, 22, 92, 72, 50, 52, 54, 84, 87, 30, 31, 32, 33, 442, 70, 72, 74, 76, 663, 40, 41, 42, 43, 44, 90, 92, 94, 96, 98, 50, 51, 52, 53, 54, 55, 840, 741, 522, 531, 60, 61, 62, 63, 64, 65, 66, 871, 544, 552, 70, 71, 72, 73, 74, 75, 76, 77, 6552, 553, 80, 81, 82, 83, 84, 85
Offset: 1

Views

Author

Paul Tek, Mar 20 2013

Keywords

Comments

This sequence is well defined (same reasoning as for A079339).

Examples

			a(39) = 663 because it is the least multiple of 39 appearing in A009996.
		

Crossrefs

a(n)/n yields sequence A223475.
Cf. A009996.

Programs

  • Mathematica
    a[n_] := Block[{x=n}, While[0 < Max@Differences@IntegerDigits@x, x += n]; x]; Array[a, 85] (* Giovanni Resta, Mar 26 2013 *)
  • Perl
    sub A223474 {
        my $n = shift;
        my $a = $n;
        while ($a !~ /^9*8*7*6*5*4*3*2*1*0*$/) {
            $a += $n;
        }
        return $a;
    }
    foreach (1..100) {
        print A223474($_), ",";
    }

A223475 Least k such that the decimal representation of k*n has digits in nonincreasing order.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 2, 2, 3, 3, 4, 1, 1, 1, 4, 3, 2, 2, 2, 3, 3, 1, 1, 1, 1, 13, 2, 2, 2, 2, 17, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 15, 13, 9, 9, 1, 1, 1, 1, 1, 1, 1, 13, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 84, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 5, 7, 5, 2, 5, 3, 4, 6, 1, 1, 75, 47, 38, 8, 45, 56, 8, 7, 5, 55, 5, 7
Offset: 1

Views

Author

Paul Tek, Mar 20 2013

Keywords

Examples

			39*17 = 663 has digits in nonincreasing order, and no k < 17 has this property, hence a(39) = 17.
		

Crossrefs

a(n)*n yields sequence A223474.
Cf. A009996.

Programs

  • Mathematica
    a[n_] := a[nn_] := Block[{n = nn, f, w = Range@9, k = 1}, While[Mod[n, 10] == 0, n /= 10]; While[(f = Select[w, Max@ Differences@ IntegerDigits[n*#] <= 0 &, 1]) == {}, k++; w = Union@ Flatten@Table[ Select[d*10^(k-1) + w, Max@ Differences@ IntegerDigits[Mod[n*#, 10^k], 10, k] <= 0 &], {d, 0, 9}]]; f[[1]]]; Array[a, 123] (* faster than basic approach. Giovanni Resta, Mar 26 2013 *)
Previous Showing 11-20 of 32 results. Next