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

A079339 Least k such that the decimal representation of k*n contains only 1's and 0's.

Original entry on oeis.org

1, 5, 37, 25, 2, 185, 143, 125, 12345679, 1, 1, 925, 77, 715, 74, 625, 653, 61728395, 579, 5, 481, 5, 4787, 4625, 4, 385, 40781893, 3575, 37969, 37, 3581, 3125, 3367, 3265, 286, 308641975, 3, 2895, 259, 25, 271, 2405, 25607, 25, 24691358, 23935, 213, 23125
Offset: 1

Views

Author

Benoit Cloitre, Feb 13 2003

Keywords

Comments

From David Amar (dpamar(AT)gmail.com), Jul 12 2010: (Start)
This sequence is well defined.
In the n+1 first repunits (see A002275), there are at least 2 numbers that have the same value modulo n (pigeonhole principle).
The difference between those two numbers contains only 1's and 0's in decimal representation. (End)
This actually proves the stronger statement that there is always a multiple of the form 111...000 (Thm. 1 in Wu, 2014), cf. A244859 for these multiples and A244927 for the k-values. - M. F. Hasler, Mar 04 2025

Examples

			3*37 = 111 and no integer k < 37 has this property, hence a(3)=37.
		

References

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

Crossrefs

Programs

  • PARI
    d(n,i)=floor(n/10^(i-1))-10*floor(n/10^i);
    test(n)=sum(i=1,ceil(log(n)/log(10)),if(d(n,i)*(1-d(n,i)),1,0));
    a(n)=if(n<0,0,s=1; while(test(n*s)>0,s++); s)

Formula

a(n) = A004290(n)/n.
a(n) < 10^(n+1) / (9n). - Charles R Greathouse IV, Jan 09 2012
a(n) <= A244927(n), with equality for n <= 6. - M. F. Hasler, Mar 04 2025

Extensions

More terms from Vladeta Jovovic and Matthew Vandermast, Feb 14 2003
Definition simplified by Franklin T. Adams-Watters, Jan 09 2012

A244859 Least positive multiple of n which when written in base 10 is either a repunit or of the form 111...000.

Original entry on oeis.org

0, 1, 10, 111, 100, 10, 1110, 111111, 1000, 111111111, 10, 11, 11100, 111111, 1111110, 1110, 10000, 1111111111111111, 1111111110, 111111111111111111, 100, 111111, 110, 1111111111111111111111, 111000, 100, 1111110, 111111111111111111111111111, 11111100
Offset: 0

Views

Author

Chai Wah Wu, Jul 07 2014

Keywords

Comments

a(1017) has 1008 digits. - Michael S. Branicky, Feb 22 2024
a(0) = 0 by convention: It can be considered as a repunit with zero digits, A002275(0) = (10^0-1)/9, and it is a positive multiple of n in the sense of k*n with k > 0. - M. F. Hasler, Mar 04 2025

Crossrefs

Equal to A004290 for n = 1 .. 6.

Programs

  • Maple
    A244859:= proc(n) local m,d2,d5;
    d2:= padic:-ordp(n,2);
    d5:= padic:-ordp(n,5);
    m:= n/2^d2/5^d5;
    10^max(d2,d5)*(10^numtheory:-order(10,9*m)-1)/9
    end proc:
    A244859(0):= 0:
    seq(A244859(n),n= 0..100); # Robert Israel, Jul 08 2014
  • PARI
    apply( {A244859(n, m=Map(Mat([0,0])))=for(L=1,n, my(r=10^L\9); iferr(return(r-mapget(m,r%n)), E, mapput(m, r%n, r)))}, [0..33]) \\ M. F. Hasler, Mar 04 2025
  • Python
    def a(n):
        if n == 0: return 0
        moddict = {0: 0}
        for e in range(1, n+2):
            repe = (10**e-1)//9
            r = repe%n
            if r in moddict:
                return repe - moddict[r]
            else:
                moddict[r] = repe
    print([a(n) for n in range(29)]) # Michael S. Branicky, Feb 22 2024
    

Formula

a(n) = n*A244927(n). - M. F. Hasler, Mar 04 2025
a(3^k) = (10^(3^k)-1)/9. For n > 0, A055642(a(n)) <= n. If n > 2 is not a power of 3, then A055642(a(n)) < n. - Chai Wah Wu, Mar 04 2025
Showing 1-2 of 2 results.