Talk:Jordan-Pólya numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
(Factoring the 1050th jp number.)
(Undo revision 344754 by PureFox (talk) Scrub that last edit as it was working OK before.)
Tag: Undo
 
(13 intermediate revisions by 3 users not shown)
Line 8: Line 8:


:There may, of course, be more than one way to decompose a J-P number into a product of factorials but the idea is to choose the way which uses the largest factorials and present these in highest to lowest order. I've added a sentence to the task description to try and clarify this. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 09:57, 9 June 2023 (UTC)
:There may, of course, be more than one way to decompose a J-P number into a product of factorials but the idea is to choose the way which uses the largest factorials and present these in highest to lowest order. I've added a sentence to the task description to try and clarify this. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 09:57, 9 June 2023 (UTC)
:I believe (bicbw) there is no way to make 439,378,587,648,000 = 14! * 7! with only prime factorials. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 02:53, 10 June 2023 (UTC)

:Yes, your right.14! = 13!*2*7 2= 2! but no way to get a lonely 7. Of course there 16!= 2!^4 * 15! . To much work for to less advantage --[[User:Horst|Horst]] ([[User talk:Horst|talk]]) 16:28, 11 June 2023 (UTC)
== Factoring the 1050th number ==
== Factoring the 1050th number ==
The 1050th jp number is 139,345,920,000. One possible factorisation is 7! * 5!^3 * 2!^4, but the Phix/Julia/Wren entries are not getting that. I have thought of a better strategy, based on the prime powers, but it would produce the ''lowest'' factorials... --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 23:52, 9 June 2023 (UTC)
The 1050th jp number is 139,345,920,000. It factors as 7! * 5!^3 * 2!^4 or 8! * 5!^3 * 2! but the <del>Phix</del>/Julia/Wren entries are not getting that. Update: new algorithm posted, however my faffing about with prime powers is probably not the point, one-at-a-time/less greedy probably is. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 05:31, 10 June 2023 (UTC)

:Well spotted! Rather than translate yours, I've modified the decomposition algorithm I was using for both Wren versions using recursion and it now seems to be working OK. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 11:31, 10 June 2023 (UTC)

Latest revision as of 17:38, 11 June 2023

Isn't that like N-smooth_numbers using n! instead of primes?

In N-smooth numbers one can change p1..pn by 2! to n!
I think , only using 2!,3!,5!,..pn! is sufficient. 4! = (2!)^2*3!, 6! = 5!*3!... so no extra numbers will be created.

7213895789838336 =(4!)^8 * (2!)^16 == ((2!)^2 *(3!))^8 * (2!)^16 = (2!)^32*(3!)^8

Horst (talk) 08:48, 9 June 2023 (UTC)

There may, of course, be more than one way to decompose a J-P number into a product of factorials but the idea is to choose the way which uses the largest factorials and present these in highest to lowest order. I've added a sentence to the task description to try and clarify this. --PureFox (talk) 09:57, 9 June 2023 (UTC)
I believe (bicbw) there is no way to make 439,378,587,648,000 = 14! * 7! with only prime factorials. --Petelomax (talk) 02:53, 10 June 2023 (UTC)
Yes, your right.14! = 13!*2*7 2= 2! but no way to get a lonely 7. Of course there 16!= 2!^4 * 15! . To much work for to less advantage --Horst (talk) 16:28, 11 June 2023 (UTC)

Factoring the 1050th number

The 1050th jp number is 139,345,920,000. It factors as 7! * 5!^3 * 2!^4 or 8! * 5!^3 * 2! but the Phix/Julia/Wren entries are not getting that. Update: new algorithm posted, however my faffing about with prime powers is probably not the point, one-at-a-time/less greedy probably is. --Petelomax (talk) 05:31, 10 June 2023 (UTC)

Well spotted! Rather than translate yours, I've modified the decomposition algorithm I was using for both Wren versions using recursion and it now seems to be working OK. --PureFox (talk) 11:31, 10 June 2023 (UTC)