Talk:Taxicab numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎OEIS Reference confirmation: REXX still has problem?)
(added a bunch of comments here and there.)
Line 2: Line 2:
In http://mathworld.wolfram.com/TaxicabNumber.html it says a Taxicab number has to be defined n ways, not just 2 ways. So at minimum, this may be a bad title. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 05:45, 14 March 2014 (UTC)
In http://mathworld.wolfram.com/TaxicabNumber.html it says a Taxicab number has to be defined n ways, not just 2 ways. So at minimum, this may be a bad title. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 05:45, 14 March 2014 (UTC)


: Yes, I'm aware that Wolfram's MathWorld (TM) defines taxicab numbers differently than OEIS does (well, only in part). OEIS also used this alternative definition as A11541. OEIS entry A1235 is the one that is used for a model: ''Taxi-cab numbers: sums of 2 cubes in more than 1 way''. I specifically noted that this (more or less) is the definition used here in this task. If OEIS defines it thusly, I saw no reason not to use that name albeit there are two different definitions, but that isn't unusual to have multiple (conflicting) definitions. The major difference is that the OEIS A1235 sequence definition omits the (non-)usage of negative numbers (for the cubes), but from the context, he (or they) only used positive integers when generating that OEIS list. Using the OEIS A11541 definition would be beyond the scope of most programs or computers for most, I would think, the numbers almost look rarer than hen's teeth. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:17, 14 March 2014 (UTC)
: Yes, I'm aware that Wolfram's MathWorld (TM) defines taxicab numbers differently than OEIS does   (well, only in part).   OEIS also used this alternative definition as A11541.   OEIS entry A1235 is the one that is used for a model:   ''Taxi-cab numbers: sums of 2 cubes in more than 1 way''.   I specifically noted that this (more or less) is the definition used here in this task.   If OEIS defines it thusly, I saw no reason not to use that name --- albeit there are two different definitions, but that isn't unusual to have multiple (conflicting) definitions.   The major difference is that the OEIS A1235 sequence definition omits the (non-)usage of negative numbers (for the cubes), but from the context, he (or they) only used positive integers when generating that OEIS list.   Using the OEIS A11541 definition would be beyond the scope of most programs or computers for most, I would think, the numbers almost look rarer than hen's teeth. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:46, 14 March 2014 (UTC)

:: P.S.   I don't mind someone changing my quotes/wording (in the talk sections) if there is are typos, misspellings, or bad or outdated links, but not the wording or the look-and-form.   After all, the good Samaritan thing is to make the original intent clear and not obfuscated with my bad spelling and/or typos.   I was given the impression that my "talk-section" words aren't to be (or shouldn't be) edited and/or reformatted, or in someone's words, inviolate, immutable.   I would put things like italicizing, bold facing (it that a word?), superscripting/subscripting and the like into this category.   I have corrected misspellings in the past, but have been told that those changes were possible inappropriate.   I prefer that my paragraphs have sentences with a double blank after each sentence, and other stuff such as keywords, keyphrases, mathematical notations, and such thingys for readability --- unless you think that   ''' '''   has some other meaning or use.   I hate to revert changes to other people's changes to my wording (either in content or form).   I assume the intent of the changes is to make my words easier to read, but it's my choice to have more blanks to make the words, phrases, mathematical expressions, or sentences easier to peruse.   Removing them from my wording doesn't do so in my opinion, and I'd like the intent of my words or phrasing to remain unaltered.   A couple of blanks hither and thither shouldn't be a bother. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:46, 14 March 2014 (UTC)


==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). Did you say if you swap a Python statement around, it produces the same result as the REXX extra-credit solution? The other thing I don't understand is what ''sets'' Python is counting (''sets'' of two sums of cubes?). Are you saying something about '''1+3''' is the same ''set'' as '''3+1'''? 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. 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. There shouldn't be any, but I've been wrong before (once or twice ...). By the way, a nit ... The Python is one number short. List the 2,000<sup>th</sup> plus a half-dozen more, that is, for a total of seven highish taxicab numbers. Not worthy of a flag. 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)
: 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]]) 20:46, 14 March 2014 (UTC)


The OEIS A001235 b-file gives the extra credit answers as
The OEIS A001235 b-file gives the extra credit answers as
Line 28: Line 30:


:This still leaves a problem with REXX which doesn't agree with the b-file at oeis.org/A001235/b001235.txt, for example REXX 2000'th == b-file 2080'th value. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 17:40, 14 March 2014 (UTC)
:This still leaves a problem with REXX which doesn't agree with the b-file at oeis.org/A001235/b001235.txt, for example REXX 2000'th == b-file 2080'th value. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 17:40, 14 March 2014 (UTC)

:: This'll take some time, so please be patient if I don't get back within a couple of days. &nbsp; What I really need is another fast PeeCee and a clone or two to work on this stuff. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:46, 14 March 2014 (UTC)

Revision as of 20:46, 14 March 2014

Not how Wolfram defines Taxicab numbers

In http://mathworld.wolfram.com/TaxicabNumber.html it says a Taxicab number has to be defined n ways, not just 2 ways. So at minimum, this may be a bad title. --TimToady (talk) 05:45, 14 March 2014 (UTC)

Yes, I'm aware that Wolfram's MathWorld (TM) defines taxicab numbers differently than OEIS does   (well, only in part).   OEIS also used this alternative definition as A11541.   OEIS entry A1235 is the one that is used for a model:   Taxi-cab numbers: sums of 2 cubes in more than 1 way.   I specifically noted that this (more or less) is the definition used here in this task.   If OEIS defines it thusly, I saw no reason not to use that name --- albeit there are two different definitions, but that isn't unusual to have multiple (conflicting) definitions.   The major difference is that the OEIS A1235 sequence definition omits the (non-)usage of negative numbers (for the cubes), but from the context, he (or they) only used positive integers when generating that OEIS list.   Using the OEIS A11541 definition would be beyond the scope of most programs or computers for most, I would think, the numbers almost look rarer than hen's teeth. -- Gerard Schildberger (talk) 20:46, 14 March 2014 (UTC)
P.S.   I don't mind someone changing my quotes/wording (in the talk sections) if there is are typos, misspellings, or bad or outdated links, but not the wording or the look-and-form.   After all, the good Samaritan thing is to make the original intent clear and not obfuscated with my bad spelling and/or typos.   I was given the impression that my "talk-section" words aren't to be (or shouldn't be) edited and/or reformatted, or in someone's words, inviolate, immutable.   I would put things like italicizing, bold facing (it that a word?), superscripting/subscripting and the like into this category.   I have corrected misspellings in the past, but have been told that those changes were possible inappropriate.   I prefer that my paragraphs have sentences with a double blank after each sentence, and other stuff such as keywords, keyphrases, mathematical notations, and such thingys for readability --- unless you think that   &nbsp;   has some other meaning or use.   I hate to revert changes to other people's changes to my wording (either in content or form).   I assume the intent of the changes is to make my words easier to read, but it's my choice to have more blanks to make the words, phrases, mathematical expressions, or sentences easier to peruse.   Removing them from my wording doesn't do so in my opinion, and I'd like the intent of my words or phrasing to remain unaltered.   A couple of blanks hither and thither shouldn't be a bother. -- Gerard Schildberger (talk) 20:46, 14 March 2014 (UTC)

Extra credit discrepancy

Extra credit answers of Python and Rexx do not agree. If you swap the commented sumcubes 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. --Paddy3118 (talk) 08:42, 14 March 2014 (UTC)

I don't quite fully understand what you just wrote (two things).   Did you say if you swap a Python statement around, it produces the same result as the REXX extra-credit solution?   The other thing I don't understand is what sets Python is counting (sets of two sums of cubes?).   Are you saying something about 1+3 is the same set as 3+1?   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.   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.   There shouldn't be any, but I've been wrong before (once or twice ...).   By the way, a nit ... The Python is one number short.   ... List the 2,000th plus a half-dozen more, that is, for a total of seven highish taxicab numbers.   Not worthy of a flag.   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). -- Gerard Schildberger (talk) 20:46, 14 March 2014 (UTC)

The OEIS A001235 b-file gives the extra credit answers as

2000 1671816384
2001 1672470592
2002 1673170856
2003 1675045225
2004 1675958167
2005 1676926719
2006 1677646971
2007 1680918365

Sonia (talk) 16:43, 14 March 2014 (UTC)

OEIS Reference confirmation

I downloaded the 10000 values from the OEIS b-file then compared the first 2007 with what my Python program generates.

Apart from 10 values the b-file values are the same as what the python solution produces. The 10 discrepancies are all values that have three cubic sums rather than 2. On re-reading the task taxicab numbers just need to have two or more ways of summing. I had missed that and will ammend the python solution forthwith! --Paddy3118 (talk) 17:25, 14 March 2014 (UTC)

This still leaves a problem with REXX which doesn't agree with the b-file at oeis.org/A001235/b001235.txt, for example REXX 2000'th == b-file 2080'th value. --Paddy3118 (talk) 17:40, 14 March 2014 (UTC)
This'll take some time, so please be patient if I don't get back within a couple of days.   What I really need is another fast PeeCee and a clone or two to work on this stuff. -- Gerard Schildberger (talk) 20:46, 14 March 2014 (UTC)