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

A257343 Erroneous version of A079339.

Original entry on oeis.org

1, 5, 37, 25, 2, 185, 1443, 125, 12345679, 1, 1, 925, 77, 715, 74, 625, 653, 61728395, 5269, 5, 481, 5, 43957
Offset: 1

Views

Author

N. J. A. Sloane, Apr 27 2015

Keywords

Comments

Included in accordance with OEIS policy of including published but erroneous sequences so as to give links to the correct versions.

References

  • Popular Computing (Calabasas, CA), Z-Sequences, Vol. 4 (No. 34, Apr 1976), pages PC36-4 to PC37-6, but there are many errors (cf. A079339).

Crossrefs

Cf. A079339.

A004290 Least positive multiple of n that when written in base 10 uses only 0's and 1's.

Original entry on oeis.org

1, 10, 111, 100, 10, 1110, 1001, 1000, 111111111, 10, 11, 11100, 1001, 10010, 1110, 10000, 11101, 1111111110, 11001, 100, 10101, 110, 110101, 111000, 100, 10010, 1101111111, 100100, 1101101, 1110, 111011, 100000, 111111, 111010
Offset: 1

Views

Author

Keywords

Comments

It is easy to show that a(n) always exists and in fact has at most n digits [Wu, 2014]. - N. J. A. Sloane, Jun 13 2014
a(n) = min{A007088(k): k > 0 and A007088(k) mod n = 0}. - Reinhard Zumkeller, Jan 10 2012
a(10^k) = 10^k and a(10^k - 1) = (10^(9k) - 1) / 9 for all k. Is a(n) < a(10^k - 1) for all n < 10^k - 1? - David Radcliffe, Aug 01 2025

Crossrefs

Programs

  • Haskell
    a004290 0 = 0
    a004290 n = head [x | x <- tail a007088_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    f:= proc(n)
    local L,x,m,r,k,j;
    if n<2 then return n fi;
    for x from 2 to n-1 do L[0,x]:= 0 od:
    L[0,0]:= 1: L[0,1]:= 1;
    for m from 1 do
       if L[m-1,(-10^m) mod n] = 1 then break fi;
       L[m,0]:= 1;
       for k from 1 to n-1 do
         L[m,k]:= max(L[m-1,k],L[m-1,k-10^m mod n])
       od;
    od;
    r:= 10^m; k:= -10^m mod n;
    for j from m-1 by -1 to 1 do
        if L[j-1,k] = 0 then
          r:= r + 10^j; k:= k - 10^j mod n;
        fi
    od;
    if k = 1 then r:= r + 1 fi;
    r
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Feb 09 2016
  • Mathematica
    a[n_] := For[k = 1, True, k++, b = FromDigits[ IntegerDigits[k, 2] ]; If[Mod[b, n] == 0, Return[b]]]; a[0] = 0; Table[a[n], {n, 0, 34}] (* Jean-François Alcover, Jun 14 2013, after Reinhard Zumkeller *)
    With[{c=Rest[Union[FromDigits/@Flatten[Table[Tuples[{1,0},i],{i,10}], 1]]]}, Join[{0},Flatten[ Table[ Select[c,Divisible[#,n]&,1],{n,40}]]]] (* Harvey P. Dale, Dec 07 2013 *)
  • PARI
    a(n) = {if( n==0, return (0)); my(m = n); while (vecmax(digits(m)) != 1, m+=n); m;} \\ Michel Marcus, Feb 09 2016, May 27 2020
    
  • PARI
    apply( {A004290(n)=for(k=1,2^n,(t=fromdigits(binary(k)))%n||return(t))}, [1..44]) \\ M. F. Hasler, Mar 04 2025
  • Python
    def A004290(n):
        if n > 0:
            for i in range(1,2**n):
                x = int(bin(i)[2:])
                if not x % n:
                    return x
        return 0
    # Chai Wah Wu, Dec 30 2014
    

Formula

a(n) = n*A079339(n). - Jonathan Sondow, Jun 15 2014

Extensions

Initial 0 deleted and offset corrected by N. J. A. Sloane, Jan 31 2024

A078241 Smallest multiple of n using only digits 0 and 2.

Original entry on oeis.org

2, 2, 222, 20, 20, 222, 2002, 200, 222222222, 20, 22, 2220, 2002, 2002, 2220, 2000, 22202, 222222222, 22002, 20, 20202, 22, 220202, 22200, 200, 2002, 2202222222, 20020, 2202202, 2220, 222022, 20000, 222222, 22202, 20020, 2222222220, 222
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a078241 n = head [x | x <- tail a169965_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    Module[{m=Rest[FromDigits/@Tuples[{0,2},12]]},Table[Select[m,Divisible[ #,n]&,1],{n,40}]]//Flatten (* Harvey P. Dale, Jul 31 2017 *)
  • Python
    def A078241(n):
        if n > 0:
            for i in range(1,2**n):
                x = 2*int(bin(i)[2:])
                if not x % n:
                    return x
        return 0 # Chai Wah Wu, Dec 30 2014

Formula

a(n) < 10^n / (0.45 n). - Charles R Greathouse IV, Jan 09 2012
a(n) <= A216812(n) <= 2(10^n - 1)/9. - N. J. A. Sloane, Sep 18 2012

Extensions

More terms from Ray Chandler, Jul 12 2004

A078248 Smallest multiple of n using only digits 0 and 9.

Original entry on oeis.org

9, 90, 9, 900, 90, 90, 9009, 9000, 9, 90, 99, 900, 9009, 90090, 90, 90000, 99909, 90, 99009, 900, 9009, 990, 990909, 9000, 900, 90090, 999, 900900, 9909909, 90, 999099, 900000, 99, 999090, 90090, 900, 999, 990090, 9009, 9000, 99999, 90090, 9909909
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a078248 n = head [x | x <- tail a097256_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    With[{t=Flatten[Table[FromDigits[Join[{9},#]]&/@Tuples[{0,9},n],{n,0,6}]]},Flatten[Table[Select[t,Divisible[#,i]&,1],{i,50}]]] (* Harvey P. Dale, May 31 2014 *)

Extensions

More terms from Ray Chandler, Jul 12 2004

A096688 Least k such that decimal representation of k*n contains only digits 0 and 9.

Original entry on oeis.org

9, 45, 3, 225, 18, 15, 1287, 1125, 1, 9, 9, 75, 693, 6435, 6, 5625, 5877, 5, 5211, 45, 429, 45, 43083, 375, 36, 3465, 37, 32175, 341721, 3, 32229, 28125, 3, 29385, 2574, 25, 27, 26055, 231, 225, 2439, 2145, 230463, 225, 2, 215415, 1917, 1875, 202041, 18, 1959
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Formula

a(n) = A078248(n)/n.

A096681 Least k such that decimal representation of k*n contains only digits 0 and 2.

Original entry on oeis.org

2, 1, 74, 5, 4, 37, 286, 25, 24691358, 2, 2, 185, 154, 143, 148, 125, 1306, 12345679, 1158, 1, 962, 1, 9574, 925, 8, 77, 81563786, 715, 75938, 74, 7162, 625, 6734, 653, 572, 61728395, 6, 579, 518, 5, 542, 481, 51214, 5, 49382716, 4787, 426, 4625, 44898, 4
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Programs

  • PARI
    isok(n) = my(vd = vecsort(digits(n),,8)); (vd == [0,2]) || (vd == [2]);
    a(n) = my(k=1); while(!isok(k*n), k++); k; \\ Michel Marcus, Sep 25 2016
    
  • Python
    def next02(n):
      s = str(n)
      if s > '2'*len(s): return int('2' + '0'*len(s))
      for i, c in enumerate(s):
        if c == '1': return int(s[:i] + '2' + '0'*(len(s)-i-1))
        elif s[i:] > '2'*(len(s)-i): return int(s[:i-1] + '2' + '0'*(len(s)-i))
    def a(n):
      k = 1
      while set(str(k*n)) - set('02') != set(): k = max(k+1, next02(k*n)//n)
      return k
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Feb 01 2021

Formula

a(n) = A078241(n)/n.

A078242 Smallest multiple of n using only digits 0 and 3.

Original entry on oeis.org

3, 30, 3, 300, 30, 30, 3003, 3000, 333, 30, 33, 300, 3003, 30030, 30, 30000, 33303, 3330, 33003, 300, 3003, 330, 330303, 3000, 300, 30030, 333333333, 300300, 3303303, 30, 333033, 300000, 33, 333030, 30030, 33300, 333, 330030, 3003, 3000, 33333
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a078242 n = head [x | x <- tail a169966_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    With[{lst=Rest[FromDigits/@Tuples[{0,3},10]]},Table[SelectFirst[lst,Mod[#,n]==0&],{n,50}]] (* Harvey P. Dale, May 31 2025 *)
  • Python
    def A078242(n):
        if n > 0:
            for i in range(1,2**n):
                x = 3*int(bin(i)[2:])
                if not x % n:
                    return x
        return 0 # Chai Wah Wu, Dec 31 2014

Extensions

More terms from Ray Chandler, Jul 12 2004

A190301 Smallest number h such that n*h is a repunit (A002275), or 0 if no such h exists.

Original entry on oeis.org

1, 0, 37, 0, 0, 0, 15873, 0, 12345679, 0, 1, 0, 8547, 0, 0, 0, 65359477124183, 0, 5847953216374269, 0, 5291, 0, 48309178743961352657, 0, 0, 0, 4115226337448559670781893, 0, 38314176245210727969348659, 0, 3584229390681, 0, 3367, 0, 0, 0, 3, 0, 2849, 0, 271, 0
Offset: 1

Views

Author

Jaroslav Krizek, May 07 2011

Keywords

Examples

			For n = 7: a(7) = 15873 because 7 * 15873 = 111111. Repunit 111111 is the smallest repunit with prime factor 7.
		

Crossrefs

Cf. A084681 (repunit length), A216479 (the repunit).
Cf. A050782 = the smallest number h such that n*h is palindromic number, A083117 = the smallest number h such that n*h is repdigit number.

Programs

  • Mathematica
    Table[If[GCD[n, 10] > 1, 0, k = MultiplicativeOrder[10, 9*n]; (10^k - 1)/(9*n)], {n, 100}] (* T. D. Noe, May 08 2011 *)
  • PARI
    a(n)=if(gcd(n,10)>1, 0, (10^znorder(Mod(10,9*n))-1)/9/n) \\ Charles R Greathouse IV, Aug 28 2016

A257345 Regard the terms of A004290 as binary numbers and convert to base 10.

Original entry on oeis.org

0, 1, 2, 7, 4, 2, 14, 9, 8, 511, 2, 3, 28, 9, 18, 14, 16, 29, 1022, 25, 4, 21, 6, 53, 56, 4, 18, 895, 36, 109, 14, 59, 32, 63, 58, 18, 2044, 7, 50, 21, 8, 31, 42, 109, 12, 1022, 106, 19, 112, 97, 4, 35, 36, 35, 1790, 6, 72, 25, 218, 223, 28, 37, 118, 991, 64
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2015

Keywords

Comments

Of course the terms of A004290 are already in base 10 (they just happen to involve only the digits 0 and 1), so there is no justification for this sequence other than curiosity.
a(n) < 2^n. - Chai Wah Wu, Apr 29 2015

Crossrefs

Programs

  • Mathematica
    s = With[{c = Rest[Union[FromDigits /@ Flatten[Table[Tuples[{1, 0}, i], {i, 10}], 1]]]}, Join[{0}, Flatten[Table[Select[c, Divisible[#, n] &, 1], {n, 120}]]]]; FromDigits[IntegerDigits@ #, 2] & /@ s (* Michael De Vlieger, Apr 29 2015, after Harvey P. Dale at A004290 *)
  • Python
    def A257345(n):
        if n > 0:
            for i in range(1, 2**n):
                x = int(format(i, 'b'))
                if not x % n:
                    return int(str(x), 2)
        return 0 # Chai Wah Wu, Apr 29 2015

Extensions

More terms from Chai Wah Wu, Apr 29 2015

A078243 Smallest multiple of n using only digits 0 and 4.

Original entry on oeis.org

4, 4, 444, 4, 40, 444, 4004, 40, 444444444, 40, 44, 444, 4004, 4004, 4440, 400, 44404, 444444444, 44004, 40, 40404, 44, 440404, 4440, 400, 4004, 4404444444, 4004, 4404404, 4440, 444044, 4000, 444444, 44404, 40040, 444444444, 444, 44004, 40404
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a078243 n = head [x | x <- tail a169967_list, mod x n == 0]
    -- Reinhard Zumkeller, Jan 10 2012

Extensions

More terms from Ray Chandler, Jul 12 2004
Showing 1-10 of 32 results. Next