Talk:Numbers which are the cube roots of the product of their proper divisors: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Hint: Commented)
(Comments on comments, hints and OEIS...)
Line 6: Line 6:
:Considering that 41^3 is greater than 65535, I wasn't going to attempt the task in a 16 bit language but I think I will now... thanks. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 16:05, 30 September 2022 (UTC)
:Considering that 41^3 is greater than 65535, I wasn't going to attempt the task in a 16 bit language but I think I will now... thanks. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 16:05, 30 September 2022 (UTC)
::Hmm, it's just dawned on me that, despite obtaining the correct answer for the 50,000th term, the Wren solution is unsafe for n > 208063 as n^3 will then exceed 2^53 which is the maximum integer the language can safely deal with. I've changed it now so that it is safe. BTW I did intend the task to be simple but not deceptively so :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 17:55, 30 September 2022 (UTC)
::Hmm, it's just dawned on me that, despite obtaining the correct answer for the 50,000th term, the Wren solution is unsafe for n > 208063 as n^3 will then exceed 2^53 which is the maximum integer the language can safely deal with. I've changed it now so that it is safe. BTW I did intend the task to be simple but not deceptively so :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 17:55, 30 September 2022 (UTC)

:::Thanks, both.
:::Purefox, I noticed your comment on the newer Wren solution and checked the OEIS page and it does indeed say that the sequence is 1 and the numbers with 8 divisors! So it really is simple and divisor products, cubes, cube roopts etc. are not needed.
:::BTW, I didn't mean "deceptively simple" as an insult... It started out looking simple but when the magnitude of the divisor products became apparent, it started to look hard but (as with a lot of things) it is actually simple if you use the right technique (i.e. someone shows you a better approach). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:58, 30 September 2022 (UTC)

Revision as of 21:58, 30 September 2022

Hint

Currently one of the task implementations has the text "Whilst deceptively simple, the task reuires large integers as some of the divisor prioducts needed are large" -- but this is not actually the case, as the divisor products are not needed for this task. (Or at least the requirement for large integers is unnecessary -- I am agnostic about whether the task is deceptively simple.) --Rdm (talk) 15:20, 30 September 2022 (UTC)

Hi Rdm, Thanks for the hint. Before I posted the Algol 68 sample, I saw your comment that we just need to inspect the powers of the prime factors but at the time I didn't realise what you meant and not being au-fait with J, couldn't read your code to find out. However after googling stuff about cubes I now realise what you meant. I shall reword that comment.
Considering that 41^3 is greater than 65535, I wasn't going to attempt the task in a 16 bit language but I think I will now... thanks. --Tigerofdarkness (talk) 16:05, 30 September 2022 (UTC)
Hmm, it's just dawned on me that, despite obtaining the correct answer for the 50,000th term, the Wren solution is unsafe for n > 208063 as n^3 will then exceed 2^53 which is the maximum integer the language can safely deal with. I've changed it now so that it is safe. BTW I did intend the task to be simple but not deceptively so :) --PureFox (talk) 17:55, 30 September 2022 (UTC)
Thanks, both.
Purefox, I noticed your comment on the newer Wren solution and checked the OEIS page and it does indeed say that the sequence is 1 and the numbers with 8 divisors! So it really is simple and divisor products, cubes, cube roopts etc. are not needed.
BTW, I didn't mean "deceptively simple" as an insult... It started out looking simple but when the magnitude of the divisor products became apparent, it started to look hard but (as with a lot of things) it is actually simple if you use the right technique (i.e. someone shows you a better approach). --Tigerofdarkness (talk) 21:58, 30 September 2022 (UTC)