login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307636 Numbers k with property that no two divisors of k share a common digit. 1

%I #25 Dec 09 2021 01:04:54

%S 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,

%T 223,227,229,233,239,257,263,267,269,277,283,293,307,337,347,349,353,

%U 359,367,373,379,383,389,397,409,433,439,443,449,457,463,467,479,487,499,503

%N Numbers k with property that no two divisors of k share a common digit.

%H Robert Israel, <a href="/A307636/b307636.txt">Table of n, a(n) for n = 1..10000</a>

%H Giorgos Kalogeropoulos, <a href="https://codegolf.stackexchange.com/questions/185102/hostile-divisor-numbers">Hostile Divisor Numbers</a>, Code Golf, May 2019.

%e 9566 is such a number because its divisors are 1, 2, 4783 and 9566, and no two of them share the same digit.

%p filter:= proc(n) local D,i,j;

%p D:= map(t -> convert(convert(t,base,10),set), convert(numtheory:-divisors(n),list));

%p for i from 2 to nops(D) do

%p for j from 1 to i-1 do

%p if D[i] intersect D[j] <> {} then return false fi

%p od od;

%p true

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Jul 07 2019

%t Select[Range@1000,!Or@@IntersectingQ@@@Subsets[IntegerDigits@Divisors[#],{2}]&]

%o (PARI) isok(k) = {my(d = divisors(k), dd = apply(x->Set(digits(x)), d)); for (i=1, #dd, for (j=i+1, #dd, if (#setintersect(dd[i], dd[j]), return (0)););); return (1);} \\ _Michel Marcus_, Jul 07 2019

%o (Python)

%o from itertools import count, combinations, islice

%o from sympy import divisors

%o def A307636gen(): return filter(lambda n:all(len(set(s[0])&set(s[1])) == 0 for s in combinations((str(d) for d in divisors(n,generator=True)),2)),count(1))

%o A307636_list = list(islice(A307636gen(),20)) # _Chai Wah Wu_, Dec 08 2021

%Y A038603 is a subsequence.

%K nonn,base

%O 1,2

%A _Giorgos Kalogeropoulos_, May 03 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)