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 41-44 of 44 results.

A334963 a(n) is the least positive multiple of n that has at most two distinct digits.

Original entry on oeis.org

1122, 515, 1144, 525, 212, 535, 1188, 545, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 600, 121, 122, 3444, 744, 500, 252, 889, 4224, 774, 10010, 131, 660, 133, 4422, 4455, 272, 411, 414, 556, 700, 141, 994, 858, 144, 3335, 292, 441, 444, 447, 300, 151, 2888
Offset: 102

Views

Author

David A. Corneth, May 17 2020

Keywords

Examples

			a(102) = 1122 as 1122 = 11*102 is the least multiple of 102 that has at most 2 distinct digits.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n}, While[Length @ Select[DigitCount[k, 10], # > 0 &] > 2, k += n]; k]; Array[a, 51, 102] (* Amiram Eldar, May 21 2020 *)
  • PARI
    a(n) = for(i = 1, oo, if(#Set(digits(i*n))<3, return(i*n)))

Formula

a(n) <= A004290(n).
a(n) = n if n is in A031955. - Bernard Schott, May 17 2020

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

A216478 a(n) is the least multiple of n which uses only digits 1 and 2. a(n) = -1 if no such multiple exists.

Original entry on oeis.org

1, 2, 12, 12, -1, 12, 21, 112, 12222, -1, 11, 12, 221, 112, -1, 112, 221, 12222, 1121, -1, 21, 22, 12121, 2112, -1, 1222, 21222, 112, 12122, -1, 11222, 2112, 1122, 1122, -1, 22212, 111, 12122, 111111, -1, 11111, 12222, 12212, 2112, -1, 122222, 1222, 2112, 11221, -1, 1122, 21112, 212, 21222, -1, 112, 212211, 12122, 1121
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Crossrefs

A334423 Fixed points of A257345.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 21, 32, 42, 64, 84, 128, 168, 256, 336, 512, 672, 1024, 1344, 2048, 2231, 2688, 4096, 4462, 5376, 8192, 9324, 10752, 16384, 18648, 21504, 32768, 37296, 43008, 65536, 74592, 86016, 131072, 149184, 172032, 262144, 298368, 344064, 524288, 596736, 688128, 1048576
Offset: 1

Views

Author

Bernard Schott, May 25 2020

Keywords

Comments

The least positive multiple of an integer m that when written in base 10 uses only 0's and 1's is q = A004290(m) = k*m. If we regard q as binary number and converts q to base 10, we get A257345(q) = u. When m = u, then m is a term.
If m is a term, then m*2^k is another term.
The first 3 primitive terms are 1, 21, 2231 and the 3 corresponding subsequences of such fixed points are,
-> m = 0 or m = 2^k, k>=0 (A131577),
-> m = 21 * 2^k, k>=0 (A175805),
-> m = 2231 * 2^k, k>=0 (2231, 4462, 9324, 18648, ...).

Examples

			The least positive multiple of 42 that when written in base 10 uses only 0's and 1's is 101010 = 2405*42. If we regard 101010 as binary number and converts to base 10, we get 42; hence, 42 is a term.
Successive operations for first primitive terms:
1 --> A004290(1) = 1_{10} --> 1_{2} = 1_{10},
21 --> A004290(21) = 10101_{10} --> 10101_{2} = 21_{10},
2231 --> A004290(2231) = 100010110111_{10} --> 100010110111_{2} = 2231_{10}.
		

Crossrefs

Subsequences: A131577, A175805.

Programs

  • PARI
    f(n) = {if( n==0, return (0)); my(m = n); while (vecmax(digits(m)) != 1, m+=n); m; } \\ A004290
    isok(m) = fromdigits(digits(f(m), 10), 2) == m; \\ Michel Marcus, May 29 2020

Formula

A257345(A004290(a(n))) = a(n).
Previous Showing 41-44 of 44 results.