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.

A244356 Numbers n such that n and n+1 are not divisible by any of their nonzero digits.

Original entry on oeis.org

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

Views

Author

Derek Orr, Jun 26 2014

Keywords

Comments

This is a subsequence of A038772.
All numbers end in a 3, 6, 7, 8, or 9.

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.
		

Crossrefs

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)