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.

A237766 Least initial number of n consecutive integers that are not divisible by any of their nonzero digits.

This page as a plain text file.
%I A237766 #17 May 22 2025 10:21:36
%S A237766 23,37,56,56,866
%N A237766 Least initial number of n consecutive integers that are not divisible by any of their nonzero digits.
%C A237766 This sequence is complete. If a(6) were to exist, the 6 numbers would have to end in either {1,2,3,4,5,6}, {2,3,4,5,6,7}, {3,4,5,6,7,8}, {4,5,6,7,8,9}, {5,6,7,8,9,0}, {6,7,8,9,0,1}, {7,8,9,0,1,2}, {8,9,0,1,2,3}, {9,0,1,2,3,4}, or {0,1,2,3,4,5}. However, if the number has a 1 as a digit, it cannot be one of the consecutive integers. Also, if a number has a 5 as its last digit, it cannot be one of the consecutive integers. Thus, none of these sets could work.
%C A237766 If all numbers were distinct and nontrivial, a(4) would be 586 (the trivial numbers after 56 are 506 and 556).
%e A237766 23 is the first number that is not divisible by either of its digits.
%e A237766 37 and 38 are the first two consecutive numbers that are not divisible by any of their digits. Thus, a(2) = 37.
%e A237766 56, 57, 58 (and 59) are the first three (and four) consecutive numbers that are not divisible by any of their digits. Thus, a(3) = a(4) = 56.
%e A237766 866, 867, 868, 869, and 870 are the first five consecutive numbers that are not divisible by any of their digits. Thus, a(5) = 866.
%o A237766 (Python)
%o A237766 def DivDig(x):
%o A237766   total = 0
%o A237766   for i in str(x):
%o A237766     if i != '0':
%o A237766       if x/int(i) % 1 == 0:
%o A237766         return True
%o A237766   return False
%o A237766 def Nums(x):
%o A237766   n = 1
%o A237766   while n < 10**3:
%o A237766     count = 0
%o A237766     for i in range(n,n+x):
%o A237766       if not DivDig(i):
%o A237766         count += 1
%o A237766       else:
%o A237766         break
%o A237766     if count == x:
%o A237766       return n
%o A237766     else:
%o A237766       n += 1
%o A237766 x = 1
%o A237766 while x < 10:
%o A237766   print(Nums(x))
%o A237766   x += 1
%Y A237766 Cf. A038772, A005349.
%K A237766 nonn,full,fini,base
%O A237766 1,1
%A A237766 _Derek Orr_, Feb 12 2014