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-3 of 3 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

A244927 Least positive number k such that k*n written in base 10 is either a repunit or of the form 1111....0000.

Original entry on oeis.org

1, 5, 37, 25, 2, 185, 15873, 125, 12345679, 1, 1, 925, 8547, 79365, 74, 625, 65359477124183, 61728395, 5847953216374269, 5, 5291, 5, 48309178743961352657, 4625, 4, 42735, 4115226337448559670781893, 396825, 38314176245210727969348659, 37, 3584229390681, 3125, 3367, 326797385620915
Offset: 1

Views

Author

Chai Wah Wu, Jul 08 2014

Keywords

Examples

			For n = 7, 15873*7 = 111111 and this is the least positive multiple of 7 that is either a repunit or of the form 1111...000.
		

Crossrefs

Cf. A244859, A079339, A004290. Equal to A079339 for the first 6 terms.

Formula

a(n) = A244859(n)/n.
a(3^k) = (10^(3^k)-1)/3^(k+2). a(n) <= (10^n-1)/(9*n). If n > 2 is not a power of 3, then a(n) <= (10^(n-1)-1)/(9*n). - Chai Wah Wu, Mar 04 2025

A370571 Smallest multiple of n that when written in base 10 uses only 0's and 1's and at least one of each.

Original entry on oeis.org

10, 10, 1011, 100, 10, 1110, 1001, 1000, 1011111111, 10, 110, 11100, 1001, 10010, 1110, 10000, 11101, 1111111110, 11001, 100, 10101, 110, 110101, 111000, 100, 10010, 1101111111, 100100, 1101101, 1110, 111011, 100000, 1101111, 111010, 10010, 11111111100, 1110, 110010, 10101, 1000
Offset: 1

Views

Author

Ivan N. Ianakiev, Feb 22 2024

Keywords

Comments

For all n, a(n) exists (see proof in References).

References

  • Peter Winkler, Mathematical Puzzles (revised edition), CRC Press, 2024, p. liii.

Crossrefs

Programs

  • Mathematica
    a[n_]:=Min[Select[FromDigits/@Tuples[{0,1},n+1],
    Divisible[#,n]&&Union[IntegerDigits[#]]=={0,1}&]]; a/@Range[23]
  • Python
    from itertools import count
    def a(n): return next(d for k in count(1) if ("0" in (b:=bin(k)[2:])) and (d:=int(b))%n==0)
    print([a(n) for n in range(1, 24)]) # Michael S. Branicky, Feb 22 2024

Formula

a(10^e-1) <= 1^e 0 1^(8*e), where ^ denotes repeated concatenation of digits on the right-hand side. - Michael S. Branicky, Feb 22 2024

Extensions

More terms from Michael S. Branicky, Feb 22 2024
Showing 1-3 of 3 results.