31
1
Some divisors of positive integers really hate each other and they don't like to share one or more common digits.
Those integers are called Hostile Divisor Numbers (HDN)
Examples
Number 9566
has 4
divisors: 1, 2, 4783 and 9566
(as you can see, no two of them share the same digit).
Thus, 9566 is a Hostile Divisor Number
Number 9567
is NOT HDN because its divisors (1, 3, 9, 1063, 3189, 9567
) share some common digits.
Here are the first few HDN
1,2,3,4,5,6,7,8,9,23,27,29,37,43,47,49,53,59,67,73,79,83,86,87,89,97,223,227,229,233,239,257,263,267,269,277,283,293,307,337...
Task
The above list goes on and your task is to find the nth HDN
Input
A positive integer n
from 1
to 4000
Output
The nth
HDN
Test Cases
here are some 1-indexed test cases.
Please state which indexing system you use in your answer to avoid confusion.
input -> output
1 1
10 23
101 853
1012 26053
3098 66686
4000 85009
This is code-golf, so the lowest score in bytes wins.
EDIT
Good news!
I submitted my sequence to OEIS and...
Hostile Divisor Numbers are now OEIS A307636
1I think square numbers would be the least hostile of numbers. – Frambot – 2019-05-03T17:59:15.903
3@JoeFrambach That I do not understand. There are perfect-square HDN. For a somewhat large example,
94699599289
, the square of307733
, has divisors[1, 307733, 94699599289]
which shows it is a HDN. Seems hostile to me. – Jeppe Stig Nielsen – 2019-05-05T17:21:53.003@JeppeStigNielsen For a much smaller example, why not just
49
? Factors[1, 7, 49]
qualifies as hostile... Or, well,4
:[1, 2, 4]
... – Darrel Hoffman – 2019-05-06T13:27:23.207@DarrelHoffman Not to mention, the square number
1
with divisor list[1]
. (Maybe large HDN are more interesting?) – Jeppe Stig Nielsen – 2019-05-06T18:09:22.753I interpreted
49
as having divisors[7, 7]
, which not only share digits but are the same digits.49
has factors[1, 7, 49]
– Frambot – 2019-05-06T19:59:30.773this would be pretty tough in binary. – don bright – 2019-05-08T23:40:03.393