[Jprogramming] Partitions

Erling Hellenäs erling at erlinghellenas.se
Fri Nov 3 16:07:40 UTC 2017


No, its not. It seems it should have bin there. Maybe something is 
wrong. /Erling

On 2017-11-03 16:56, Erling Hellenäs wrote:
> Lol. This root is double-counted. 1 1 1 1 358358 /Erling
>
> On 2017-11-03 16:42, Erling Hellenäs wrote:
>> Hi all!
>>
>> My take:
>>
>>    v=:1 1 1 1 2 7 11 13 179
>>    r=:5 parRuskeyE 9
>>    r2=: >r (*/)@:{&.>"1 0 < v
>>    r3=:/:~"1 r2
>>    r4=: ~.r3
>>    NB. One root is 1 1 1 1 358358
>>    NB. All permutations
>>    (!5)*1+#r4
>> 6360
>>
>> Cheers,
>>
>> Erling Hellenäs
>>
>> On 2017-11-03 15:03, Erling Hellenäs wrote:
>>> Sorry. Add ones. /Erling
>>>
>>> On 2017-11-03 15:00, Erling Hellenäs wrote:
>>>> OK. The five prime factors are needed if you want to multiply 5 
>>>> numbers and get 358358, except that you can possibly add zeros and  
>>>> 358358 itself? /Erling
>>>>
>>>> On 2017-11-03 14:35, 'Mike Day' via Programming wrote:
>>>>> Language differences?
>>>>>
>>>>> Personally,  I tend to be rather careless,  using the terms 
>>>>> “factor” and “divisor” for the same thing,  when “divisor” is 
>>>>> perhaps to be preferred.  However,  Pari GP provides a library 
>>>>> function “factor” to deliver the prime factorisation of its 
>>>>> argument,  in a similar fashion to J’s q: .
>>>>>
>>>>> So, strictly speaking,  perhaps,  the factors of 358358 are 2 7 11 
>>>>> 13 179 and its divisors are 1 2 7 11 13 14 22 etc...
>>>>>
>>>>> You’re both right!
>>>>>
>>>>> Mike
>>>>>
>>>>> Please reply to mike_liz.day at tiscali.co.uk.
>>>>> Sent from my iPad
>>>>>
>>>>>> On 3 Nov 2017, at 11:25, Erling Hellenäs 
>>>>>> <erling at erlinghellenas.se> wrote:
>>>>>>
>>>>>> Hi all!
>>>>>>
>>>>>> Raul:
>>>>>>
>>>>>> "Hmm... actually, thinking about it, the par approach here is not
>>>>>> efficient enough for this example. 5 parRuskeyE 32 is too big of a
>>>>>> result, I think. (358358 has 5 distinct prime factors and, thus, 32
>>>>>> integer factors.)"
>>>>>>
>>>>>> However there are only 5 integer factors:
>>>>>>
>>>>>>    q: 358358
>>>>>> 2 7 11 13 179
>>>>>>    */q:358358
>>>>>> 358358
>>>>>>
>>>>>> Now you ask me for 44 5 integer factorizations.
>>>>>>
>>>>>> As far as I understand there is only one 5 integer factorization 
>>>>>> of 358358 unless you count 1 and 358358 as factors.
>>>>>> In any case it can be handled by parRuskeyE.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Erling Hellenäs
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Den 2017-11-03 kl. 10:58, skrev Raul Miller:
>>>>>>> I'm not sure where you showed the 44 different 5 integer
>>>>>>> factorizations of 358358?
>>>>>>>
>>>>>>> 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
>>>>
>>>>
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm




More information about the Programming mailing list