Talk:Taxicab numbers: Difference between revisions

Content added Content deleted
m (→‎Extra credit discrepancy: added a comment about a discrepancy.)
Line 6: Line 6:
==Extra credit discrepancy==
==Extra credit discrepancy==
'''Extra credit answers of Python and Rexx do not agree'''. If you swap the commented <code>sumcubes</code> line in and use it instead of the line above in the Python solution I can derive exactly the same Python result by explicitly counting the ''sets'' of different ways forming the sums of two cubes. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:42, 14 March 2014 (UTC)
'''Extra credit answers of Python and Rexx do not agree'''. If you swap the commented <code>sumcubes</code> line in and use it instead of the line above in the Python solution I can derive exactly the same Python result by explicitly counting the ''sets'' of different ways forming the sums of two cubes. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:42, 14 March 2014 (UTC)

: I don't quite fully understand what you just wrote (two things). &nbsp; Did you say if you swap a Python statement around, it produces the same result as the REXX extra-credit solution? &nbsp; The other thing I don't understand is what ''sets'' Python is counting (''sets'' of two sums of cubes?). &nbsp; Are you saying something about '''1+3''' is the same ''set'' as '''3+1'''? &nbsp; Since the REXX solution has lower numbers than the Python solution (in the 2,000 range extra-credit thingy), I suspect one reason may be that the REXX version is computing more taxicab numbers, and since they are out of order, the more taxicab numbers are generated, the more likely chance that a lower taxicab number would be found. &nbsp; One method of resolving this would be for me to (re-)generate the list, but this time, list all 2,007 numbers (and look for mirror sums. &nbsp; There shouldn't be any, but I've been wrong before (once or twice ...). &nbsp; By the way, a nit ... The Python is one number short. &nbsp; ... List the 2,000<sup>th</sup> plus a half-dozen more, that is, for a total of seven highish taxicab numbers. &nbsp; Not worthy of a flag. &nbsp; I thought I had asked for an index number, but I had forgotten to include it in the task requirement (so everyone could see what the 20th taxicab number is without counting from the top). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:07, 14 March 2014 (UTC)