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.

A061807 Smallest positive multiple of n containing only even digits.

Original entry on oeis.org

2, 2, 6, 4, 20, 6, 28, 8, 288, 20, 22, 24, 26, 28, 60, 48, 68, 288, 228, 20, 42, 22, 46, 24, 200, 26, 486, 28, 406, 60, 62, 64, 66, 68, 280, 288, 222, 228, 468, 40, 82, 42, 86, 44, 2880, 46, 282, 48, 686, 200, 204, 208, 424, 486, 220, 224, 228, 406, 826, 60, 244, 62
Offset: 1

Views

Author

Amarnath Murthy, May 28 2001

Keywords

Examples

			a(7) = 28 because among the multiples of 7, that is, 7, 14, 21, 28,... 28 is the smallest multiple with only even digits.
a(16) = 48 is the first example where k(n) = a(n)/n > 1 is odd. The next examples are k(54) = 9, k(58) = 7, k(74) = 3, k(76) = 3, k(92) = 5, k(94) = 3, k(96) = 3, k(98) = 7. - _M. F. Hasler_, Mar 03 2025
		

Crossrefs

Cf. A350538 (proper multiple).

Programs

  • Mathematica
    Table[k = n; While[Length[Intersection[{1, 3, 5, 7, 9}, IntegerDigits[k]]] > 0, k = k + n]; k, {n, 100}] (* T. D. Noe, Jun 03 2013 *)
    spme[n_]:=Module[{k=1},While[AnyTrue[IntegerDigits[k*n],OddQ],k++];k*n]; Array[spme,70] (* Harvey P. Dale, Mar 19 2024 *)
  • PARI
    apply( {A061807(n)=forstep(k=if(n%2,n*=2,n),oo,n, digits(k)%2||return(k))}, [1..99]) \\ M. F. Hasler, Mar 03 2025
    
  • Python
    A061807 = lambda n: next(n*k for k in range(1+n%2, 9<<99, 1+n%2)if not any(int(d)&1 for d in str(n*k))) # M. F. Hasler, Mar 03 2025

Formula

a(n) = n if n has only even digits, else 2n if n has only digits < 5, else 2*R(3k+3)+6*R(2k+2) if n = m*(10^k-1) with m = 1, 2, 4 or 8, else 10*a(n/5) if n = 5*(10^n-1). - M. F. Hasler, Mar 03 2025

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 29 2001

A296009 Smallest number m such that (2n-1)*m has only odd digits.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 5, 3, 5, 11, 1, 1, 1, 1, 1, 13, 13, 3, 11, 11, 1, 1, 1, 1, 1, 13, 5, 3, 5, 11, 1, 1, 1, 1, 1, 17, 11, 7, 11, 11, 1, 1, 1, 1, 1, 11, 5, 3, 5, 11, 1, 1, 1, 1, 1, 11, 11, 3, 11, 15, 1, 1, 1, 1, 1, 11, 5, 11, 5, 13
Offset: 1

Views

Author

Yang Haoran, Dec 02 2017

Keywords

Comments

Record values:
1 * 1 = 1
21 * 15 = 315
81 * 17 = 1377
167 * 19 = 3173
169 * 33 = 5577
201 * 155 = 31155
633 * 283 = 179139
1011 * 743 = 751173
1101 * 833 = 917133
2001 * 1555 = 3111555
9091 * 4309 = 39173119
9901 * 32231 = 319119131
91001 * 34193 = 3111597193
100011 * 37927 = 3793117197
101001 * 58553 = 5913911553
200001 * 155555 = 31111155555
909091 * 431109 = 391917311919
990001 * 12121113 = 11999913991113
999001 * 31222311 = 31191119911311
... (above are exhaustive)
99990001 * 31122223111 = 3111911119991113111 (verified smallest)
9999900001 * 31112222231111 = 311119111119999111131111 (not verified smallest)

Examples

			For n = 11, 2n-1 = 21, 21*15 = 315 which has all odd digits.
For m = 1 to 14, n*m listed are 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, all of which contains at least one even digit.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{m = 1, nn = 2n -1, od = {1, 3, 5, 7, 9}}, While[ Union@ Join[od, IntegerDigits[m*nn]] != od, m += 2]; m]; Array[f, 75] (* Robert G. Wilson v, Dec 05 2017 *)
  • PARI
    isok(n, m) = {my(d = digits((2*n-1)*m)); #select(x->((x%2)==0), d) == 0;}
    a(n) = {my(m=1); while (!isok(n, m), m++); m;} \\ Michel Marcus, Sep 24 2019

Formula

a(n) = A061808(n)/(2n-1).

A381699 a(n) is the least nontrivial multiple of 2*n with the least possible number of even digits.

Original entry on oeis.org

4, 8, 12, 16, 30, 36, 56, 32, 36, 40, 110, 72, 52, 56, 90, 96, 136, 72, 76, 80, 336, 132, 92, 96, 150, 156, 378, 112, 116, 120, 310, 192, 132, 136, 350, 576, 370, 152, 156, 160, 574, 336, 172, 176, 990, 552, 376, 192, 196, 300, 510, 312, 318, 756, 330, 336, 570, 1392, 354, 360, 732, 372, 378
Offset: 1

Views

Author

Ali Sada and M. F. Hasler, Mar 04 2025

Keywords

Comments

By nontrivial multiple, we mean a multiple strictly larger than the number.
For even numbers, the last digit of any multiple will always be even. Also, for multiples of 10^k, all multiples will always have at least k even digits, namely k trailing '0's. Thus, if the number is a multiple of 2*10^k, there will be at least k+1 trailing even digits.
Question: if n is even, but not a multiple of 10, is there always a multiple k*n for which the last digit is the only even digit? If not, what is the smallest counterexample?
Records values of k(n) = a(n)/2n are k(1) = 2, k(5) = 3, k(7) = 4, k(11) = 5, k(21) = 8, k(45) = 11, k(58) = 12, k(101) = 55, k(182) = 108, k(1001) = 555, k(2001) = 778, k(3996) = 1001, k(7992) = 3253, k(9091) = 21545, k(9901) = 161155, ...

Examples

			a(4) = 16 is the least nontrivial multiple of 8 with only one even digit.
a(5) = 30 is the least nontrivial multiple of 10 with only one even digit.
a(10) = 40 because 40 is the least nontrivial multiple of 20, and all multiples of 20 will always have (at least) the last two digits even.
a(41) = 574 is the least positive multiple of 82 that has only one even digit.
		

Crossrefs

Cf. A061808 (similar for odd numbers), A061807.
Cf. A118070 (numbers with exactly one even decimal digit).

Programs

  • PARI
    apply( {A381699(n, o=valuation(5*n*=2,10))=for(k=2, oo, #[0|d<-digits(n*k)%2, !d]>o|| return(k*n))}, [1..99]) \\ M. F. Hasler, Mar 04 2025
Showing 1-3 of 3 results.