On Dec 12, 2007 10:14 AM, Arie Groeneveld <[EMAIL PROTECTED]> wrote:
> The last 10 digits of X for n=12197 are: 5161600000.
> The number of digits of X is 4365.

   R =: allbut2 12197
   fmtR=:":R
   #fmtR
5281
   _20{.fmtR
48320401091212800000


This was with

allbut2=:3 :0"0
 n=.1+i.y
 p=.n e. i.&.(p:inv) y
 s=.last (adj p)*.+./"1(> 1 >./\. ])_ q:n
 *./x:n^-.s +. last p *.adj s
)

adj=:[: +./ 1 _1 |.!.0"0 1 ]
last=:</\&.|.

Calculating R took maybe an hour (and I set J's priority to "idle" so
I could use
my machine for other purposes).  Formatting R was almost instant.

Calculating R could probably be made significantly faster.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to