UPS...
didn't understand Wilson's Theorem
It actually states that if N is prime that:
if !(N-1) | N = 0 then N is prime
else
N is composite
My testing didn't do !(N-1)
back to the drawing board
By the way, if your interested in Primes, take a look at the
AKS algorithm for proving primality.
It was developed in 2006 by 3 Indian computer scientists.
It rocks!
see
http://www.ams.org/bull/2005-42-01/S0273-0979-04-01037-7/home.html
ama.org is the American mathematical Society.
Do a google search for "PRIMES is in P" is the original
documentation from
the authors Manindra Agrawal, Neeraj Kayal and Nitin Saxena.
I prefere
"IT IS EASY TO DETERMINE WHETHER A GIVEN INTEGER
IS PRIME" by ANDREW GRANVILLE
check out: http://www.eff.org/awards/coop
Did you know that:
* $50,000 to the first individual or group who discovers a
prime number with at least 1,000,000 decimal digits (awarded
Apr. 6, 2000)
* $100,000 to the first individual or group who discovers
a prime number with at least 10,000,000 decimal digits
* $150,000 to the first individual or group who discovers
a prime number with at least 100,000,000 decimal digits
* $250,000 to the first individual or group who discovers
a prime number with at least 1,000,000,000 decimal digits
----- Original Message Follows -----
From: Tracy Harms <[email protected]>
To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] how to speed up 2^N where N >
10,000,000
Date: Fri, 27 Feb 2009 12:20:20 -0800
>A minor note: The shape-two portion next to the copula has
>no effect. Adding 0 _1 to a scalar results in a shape-two
>list. I recognize that this is a minor detail that does not
>contribute toward answering your question.
>
>On Fri, Feb 27, 2009 at 11:10 AM,
>> <[email protected]> wrote: I want to do:
>>
>> bigNum =: 2 $ 0 _1 + _1 + 2x^13466917
>>
>> ...
>-----------------------------------------------------------
>----------- For information about J forums see
>http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm