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.

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

Original entry on oeis.org

56, 57, 67, 477, 506, 507, 556, 557, 577, 586, 587, 596, 597, 656, 657, 667, 668, 697, 757, 758, 778, 787, 788, 857, 858, 866, 867, 868, 877, 897, 956, 957, 976, 977, 978, 4077, 4097, 4457, 4477, 4497, 4657, 4677, 4757, 4857, 4897, 4997, 5056, 5057, 5066, 5067, 5077, 5096
Offset: 1

Views

Author

Derek Orr, Jun 26 2014

Keywords

Comments

This is a subsequence of A244356.
All numbers end in a 6, 7, or 8.

Examples

			56, 57, and 58 are not divisible by their digits. Thus, 56 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    SequencePosition[Table[If[NoneTrue[n/Select[IntegerDigits[n],#>0&],IntegerQ], 1,0],{n,5100}],{1,1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 15 2018 *)
  • Python
    def a(n):
      for i in range(10**4):
        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(3)
Showing 1-1 of 1 results.