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

A350697 Smallest number m > 1 such that n * m = A350538(n) contains only even digits.

Original entry on oeis.org

2, 2, 2, 2, 4, 4, 4, 3, 32, 2, 2, 2, 2, 2, 4, 3, 4, 16, 12, 2, 2, 2, 2, 2, 8, 8, 18, 3, 14, 2, 2, 2, 2, 2, 8, 8, 6, 6, 12, 2, 2, 2, 2, 2, 64, 10, 6, 5, 14, 4, 4, 4, 8, 9, 4, 4, 4, 7, 14, 4, 4, 4, 14, 7, 4, 4, 4, 3, 12, 4, 4, 4, 28, 3, 8, 3, 6, 6, 34, 3, 6, 3, 8, 5, 8
Offset: 1

Views

Author

Bernard Schott, Jan 12 2022

Keywords

Comments

The smallest odd term is a(48) = 5 because 48*5 = 240.
Record values of a(n) are 2, 4, 32, 64, ...

Examples

			The smallest proper multiple of 9 with only even digits is A350538(9) = 288, as 288 = 9 * 32, a(9) = 32.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 2*n}, While[! AllTrue[IntegerDigits[k], EvenQ], k += n]; k/n]; Array[a, 100] (* Amiram Eldar, Jan 12 2022 *)
  • PARI
    a(n) = my(k=2); while(#select(x->((x%2) == 1), digits(k*n)), k++); k; \\ Michel Marcus, Jan 12 2022

Formula

a(n) = A350538(n) / n.

Extensions

More terms from Michel Marcus, Jan 12 2022

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

A350536 a(n) is the smallest proper multiple of 2n+1 which contains only odd digits, or -1 if no such multiple exists.

Original entry on oeis.org

3, 9, 15, 35, 99, 33, 39, 75, 51, 57, 315, 115, 75, 135, 319, 93, 99, 175, 111, 117, 533, 559, 135, 517, 539, 153, 159, 715, 171, 177, 793, 315, 195, 335, 759, 355, 511, 375, 539, 395, 1377, 913, 595, 957, 979, 1911, 1395, 1995, 3395, 9999, 1111, 515, 315, 535, 1199, 333
Offset: 0

Views

Author

Bernard Schott, Jan 04 2022

Keywords

Comments

Generalization of the problem 1/2 of International Mathematical Talent Search, round 2 (see link and 2nd example).
If the escape clause is used, it will be necessarily for terms coming from n = 12 + 25*k, k >= 0.

Examples

			a(10) = 315 = 21 * 15 is the smallest multiple of 21 which contains only odd digits.
a(4998) = 33339995 = 9997 * 3335 is the smallest multiple of 9997 which contains only odd digits, so this is the answer to the IMTS problem.
		

Crossrefs

Terms belong to A014261.

Programs

  • Mathematica
    a[n_] := Module[{m = 2*n + 1, k}, k = 3*m; While[!AllTrue[IntegerDigits[k], OddQ], k += 2*m]; k]; Array[a, 50, 0] (* Amiram Eldar, Jan 04 2022 *)
  • PARI
    isok(k) = my(d=digits(k)); #d == #select(x->((x%2)==1), d);
    a(n) = my(k=6*n+3); while (!isok(k), k+=4*n+2); k; \\ Michel Marcus, Jan 04 2022
    
  • Python
    from itertools import product, count
    def A350536(n):
        m = 2*n+1
        for l in count(len(str(m))):
            for s in product('13579',repeat=l):
                k = int(''.join(s))
                if k > m and k % m == 0:
                    return k # Chai Wah Wu, Jan 11 2022

Extensions

More terms from Michel Marcus, Jan 04 2022

A350537 Smallest number m > 1 such that (2n+1)*m = A350536(n) contains only odd digits.

Original entry on oeis.org

3, 3, 3, 5, 11, 3, 3, 5, 3, 3, 15, 5, 3, 5, 11, 3, 3, 5, 3, 3, 13, 13, 3, 11, 11, 3, 3, 13, 3, 3, 13, 5, 3, 5, 11, 5, 7, 5, 7, 5, 17, 11, 7, 11, 11, 21, 15, 21, 35, 101, 11, 5, 3, 5, 11, 3, 3, 5, 3, 3, 11, 11, 3, 11, 15, 3, 3, 13, 7, 7, 11, 5, 11, 5, 13, 5, 9, 5, 47, 5
Offset: 0

Views

Author

Bernard Schott, Jan 12 2022

Keywords

Comments

Record values of a(n) are 3, 5, 11, 15, 17, 21, 35, 101, 155, ...

Examples

			The smallest proper multiple of 21 = 2*10+1 with only odd digits is A350536(10) = 315, as 315 = 21 * 15, a(10) = 15.
		

Crossrefs

Programs

  • Mathematica
    Table[m=2;While[Or@@EvenQ[IntegerDigits[(2n+1)*++m]]];m,{n,0,79}] (* Giorgos Kalogeropoulos, Jan 12 2022 *)
  • PARI
    isok(k) = my(d=digits(k)); #d == #select(x->((x%2)==1), d);
    a(n) = my(k=6*n+3); while (!isok(k), k+=4*n+2); k/(2*n+1); \\ Michel Marcus, Jan 12 2022

Formula

a(n) = A350536(n) / (2n+1).

Extensions

More terms from Michel Marcus, Jan 12 2022
Showing 1-4 of 4 results.