Revision d2bd868c-82ec-4264-9d80-04bd6d300d14 - Code Golf Stack Exchange

#Octave, <s>49</s> 47 bytes

Just calculating the `gcd` of all pairs and counting.

 @(n)mean(mean(gcd(c=kron(ones(n,1),1:n),c')<2))

> The kronecker product is awesome.

AltStyle によって変換されたページ (->オリジナル) /