Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: common divisor selector
Date: Fri, 6 Mar 2009 20:53:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <gos2fd$ocj$1@fred.mathworks.com>
References: <25941464.1236369793215.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1236372781 24979 172.30.248.35 (6 Mar 2009 20:53:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Mar 2009 20:53:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:523131

Sam Van der Jeught <sam_vanderjeught@hotmail.com> wrote in message <25941464.1236369793215.JavaMail.jakarta@nitrogen.mathforum.org>...
> Hi all,
> is there an easy (= low calculation intensity) way to check how many common divisors the integers in a given array have? 
> e.g. :(2,3,5,7,10,15) ==> (2,5 and 10| 3,5 and 15 )= 6 times
> Thanks!
> 
> Sam

  Your description is not at all clear, Sam.  Taking your question literally there would be no common divisors at all in your example array except the number 1.  Suppose the array consists of just the two elements [60,90].  As a pair they possess six different common divisors excluding 1.  What would your count be and how is it compatible with having counted the 5 in your example twice?  You need to explain things much more carefully so that others can understand what it is you are asking.  We aren't mind readers.

Roger Stafford