On Dec 12, 2007 12:38 PM, Raul Miller <[EMAIL PROTECTED]> wrote: > 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
I should note that allbut2 may not find an appropriate minimum in all cases. This routine picks the largest pair of numbers where the prime is next to another number which has some power of some factor which is not in common with any other number in the sequence 1..n. But what we really need is to maximize the product of this "not in common" times the adjacent prime. The absolute magnitude of the number itself is basically irrelevant. When I have some time, I'll fix allbut2. That said, I am dubious that this can account for a difference of 916 digits in the result. Since n has only five digits, a product of two numbers no greater than n should contribute no more than ten digits. FYI, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
