|
|
A244357
|
|
Numbers n such that n, n+1, and n+2 are not divisible by any of their nonzero digits.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
All numbers end in a 6, 7, or 8.
|
|
LINKS
|
|
|
EXAMPLE
|
56, 57, and 58 are not divisible by their digits. Thus, 56 is a member of this sequence.
|
|
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 *)
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|