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

A382137 Smallest integer that cannot be converted to a multiple of n by changing at most one of its decimal digit.

Original entry on oeis.org

545, 51, 44, 31, 21, 21, 22, 21, 21, 11, 15, 11, 11, 11, 11, 11, 12, 11, 11, 11, 14, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12
Offset: 11

Views

Author

Mickaël Launay, Mar 27 2025

Keywords

Comments

a(n) is not defined for n<11 since any integer can be converted to a multiple of n by changing its last digit.
For all n, a(n)>=11, since any number <=10 ca be converted to 0 which is a multiple of n.
For n>=42, a(n)=11, except for a(51)=a(61)=a(71)=a(81)=a(91)=12. Especially a(n)=11 for all n>=100 because 11 is the first integer that cannot be converted to 0 or a 3-digit number.

Examples

			For n=12, any number<50 can be converted to a multiple of 12 by changing its last digit. Since a) there is no multiple of 12 between 50 and 59 so changing the last digit is useless, b) 50 can be converted to 60=5*12 and c) changing the "5" of 51 gives only odd (non multiples of 12) numbers, then a(12)=51.
		

Crossrefs

Programs

  • Python
    import math
    def test(N,M):
       t = True
       for i in range(0,math.floor(math.log(N,10))+1):
          for j in range(0,10): t = t and ((N+(j-N // 10**i % 10)*10**i)%M != 0)
       return t
    for M in range(11,100):
       N = 1
       while (not test(N,M)): N += 1
       print(N, end=', ')
Showing 1-1 of 1 results.