A244356 Numbers n such that n and n+1 are not divisible by any of their nonzero digits.
37, 46, 53, 56, 57, 58, 67, 68, 73, 78, 86, 97, 307, 337, 346, 358, 373, 376, 379, 388, 397, 406, 429, 433, 446, 457, 466, 469, 473, 477, 478, 489, 493, 498, 506, 507, 508, 538, 553, 556, 557, 558, 577, 578, 586, 587, 588, 596, 597, 598, 646, 656, 657, 658, 667, 668, 669
Offset: 1
Examples
37 is not divisible by 3 or 7 and 38 is not divisible by 3 or 8. Thus 37 is a member of this sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local L; L:= convert(convert(n,base,10), set) minus {0}; not ormap(t -> n mod t = 0, L) end proc: B:= select(filter, {$1..1000}): sort(convert(B intersect map(`-`,B,1), list)); # Robert Israel, Dec 08 2019
-
Python
def a(n): for i in range(10**3): tot = 0 for k in range(i,i+n): c = 0 for b in str(k): if b != '0': if k%int(b)!=0: c += 1 if c == len(str(k))-str(k).count('0'): tot += 1 if tot == n: print(i,end=', ') a(2)
Comments