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-17 of 17 results.

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.

A096683 Least k such that decimal representation of k*n contains only digits 0 and 4.

Original entry on oeis.org

4, 2, 148, 1, 8, 74, 572, 5, 49382716, 4, 4, 37, 308, 286, 296, 25, 2612, 24691358, 2316, 2, 1924, 2, 19148, 185, 16, 154, 163127572, 143, 151876, 148, 14324, 125, 13468, 1306, 1144, 12345679, 12, 1158, 1036, 1, 1084, 962, 102428, 1, 98765432
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{id = {0, 4}, k = 1}, While[ Union[ Join[id, IntegerDigits[k*n]]] != id, k++]; k]; Array[f, 100] (* or *)
    id = {0, 7}; lst = Union[ FromDigits /@ Flatten[ Table[ Tuples[id, j], {j, 15}], 1]]; If[ lst[[1]] == 0, lst = Rest@ lst]; f[n_] := (Min[ Select[lst, Mod[#, n] == 0 &]]/n) /. Infinity -> 0; Array[f, 100] (* or *)
    id = {0, 7}; lst = Union[ FromDigits /@ Flatten[ Table[ Tuples[id, j], {j, 15}], 1]]; If[ lst[[1]] == 0, lst = Rest@ lst]; f[n_] := (SelectFirst[lst, Mod[#, n] == 0 &, 0]/n); a = Array[f, 100] (* requires Mathematica v10 *) (* Robert G. Wilson v, Sep 26 2016 *)

Formula

a(n) = A078243(n)/n.

A096684 Least k such that decimal representation of k*n contains only digits 0 and 5.

Original entry on oeis.org

5, 25, 185, 125, 1, 925, 715, 625, 61728395, 5, 5, 4625, 385, 3575, 37, 3125, 3265, 308641975, 2895, 25, 2405, 25, 23935, 23125, 2, 1925, 203909465, 17875, 189845, 185, 17905, 15625, 16835, 16325, 143, 1543209875, 15, 14475, 1295, 125, 1355
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Formula

a(n) = A078244(n)/n.

A096685 Least k such that decimal representation of k*n contains only digits 0 and 6.

Original entry on oeis.org

6, 3, 2, 15, 12, 1, 858, 75, 74, 6, 6, 5, 462, 429, 4, 375, 3918, 37, 3474, 3, 286, 3, 28722, 25, 24, 231, 24691358, 2145, 227814, 2, 21486, 1875, 2, 1959, 1716, 185, 18, 1737, 154, 15, 1626, 143, 153642, 15, 148, 14361, 1278, 125, 134694, 12, 1306, 1155
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Comments

k*n may comprise digits of 6 or both 0 and 6. - Harvey P. Dale, Dec 29 2013

Crossrefs

Programs

  • Mathematica
    k06[n_]:=Module[{k=1},While[Max[Drop[DigitCount[k*n],{6,10,4}]]>0,k++]; k]; Array[k06,52] (* Harvey P. Dale, Dec 29 2013 *)

Formula

a(n) = A078245(n)/n.
Previous Showing 11-17 of 17 results.