[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [ITPOLITIK] Primtal for politikere



On Wed, 19 Apr 2000, Ole Tange wrote:

> Her er i koncentreret udgave eksemplet, som blev udarbejdet på
> SSLUG-mødet.
> 
> Er der een, der kan lave det om til MatHTML, så det er nemt at vise
> politikerne?
> 
> /Ole
> 
> 
> Ren matematik:
> n er primtal <=> \forall x \in {2 .. n-1}: x \gårikkeopi n

Man behøver altså ikke køre længere end til kvadratroden af n.
Jeg ved godt at du laver en matematisk beskrivelse, men alligevel....

> Program:
> sub primtal(n) { return prim(n,n-1) }
> sub prim(n,x) {
>   if(x>2) { return (x mod n) and prim(n,x-1) }
>   else    { return x mod n }
> }

Især her knækker filmen jo fuldkommen. :-/

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
When a single line of script in Linux can do things that'd keep you 
pointing-and-clicking forever in Windows, you have great motivation to learn 
that line of script.
                                        - Chris Worth on The Microsoft Matrix



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:11 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *