You could use
pseudorand =: 64006&|@:(15091&*)
pseudorand^: (<10) ]1
1 15091 4933 4925 12209 36751 61357 27691 53713 10899
best wishes, Markus
----- Original Message ---------------
Subject: [Jprogramming] pseudo-random sequence
From: "Jean Claude Coez" <[EMAIL PROTECTED]>
Date: Tue, 16 Sep 2008 10:50:53 +0200
To: "Programming forum" <[email protected]>
>Choose an integer U0 such that (0 < U0 <= 64006 )
>then define a pseudo-random sequence as:
>Un+1 = ( 15091 * Un ) mod 64007
>while n < 40000 for instance.
>
>What would be a nice J solution ? (apart my ugly solution which I don't dare
>to show...)
>Thanks
>
>
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm